I use primeng tree with selection checkbox.
In the selection, I put my model.
In the model I have the nodes.
I would like to have the data object.
How can I do it?
My code is as below:
Code: Select all
<p-tree [value]="treeSpes"
selectionMode="checkbox"
dataKey="SpecialityId"
[(selection)]="criteria.specialities"
(onNodeSelect)="selectNode($event)"
(onNodeUnselect)="unselectNode($event)"
>
<ng-template let-node pTemplate="default">
<div>
<span style="font-size: 18px;">
{{node.label}}
</span>
</div>
</ng-template>
</p-tree>