I'm new with primeNG and p-tableCheckbox. I'm using this component to create a checkbox column to check/select the right row. So the normal standard and behaviour works perfectly. But now I need to select by default some row/checkoxes by component.ts.
I'm searching everywhere and I don't find anything about this behaviour.
I tried something like this
<p-tableCheckbox #tableCheckbox [value]="rowData" [index]="rowIndex"></p-tableCheckbox>
checkSelected(event) {
this.checkboxSelected.emit(event.data);
this.tableCheckbox.checked = true;
}
where but obviously doesn't work. How can I make it work?
Aucun commentaire:
Enregistrer un commentaire