With p-treeTable i can enable selection for all rows, based on selectionMode = "single". Now i'd like to disable selection for rows, which are not intended to be selected.
PrimeNG 7, Angular 7.
If I remove [ttRow]="rowNode" [ttSelectableRow]="rowNode"
of tr's body template, all rows are not selectable.
<p-treeTable [value]="nodes" [columns]="columns" selectionMode="single"
[(selection)]="selectedNode" dataKey="id" >
...
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr [ttRow]="rowNode" [ttSelectableRow]="rowNode">
<td *ngFor="let col of columns">
{{ rowData[col.field] }}
</td>
</tr>
</ng-template>
</p-treeTable>
Now i need a check based on the row data, e.g. rowData.selectable', to enable/disable row selection based on the outcome of
rowData.selectable`.
Any ideas how to achieve this?