`
<p-treeSelect
selectionMode="checkbox"
[options]="nodes"
(onNodeSelect)="onSelectedChange($event)"
placeholder="Select"
></p-treeSelect>
`
The checkbox should be selected already, how to achieve this using p-treeselect ?
CodePudding user response:
You can use [(ngModel)]
to bind your data and then its automatically selected.
Customised with official tree example: