-
The table works: headers fill, rows fill with data, columns sort. Single row selection doesn't work. p-table:
onRowSelect:
The function is called, but when breaking at the message call the event.data and event.index are undefined. This worked before an Angular/PrimeNG upgrade. Angular 17.3, PrimeNG 17.16.1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@kvea2git Hi! I checked it and latest: 17: but it's because in the example pSelectableRowIndex is not used. Here is how it should be used: <ng-template pTemplate="body" let-product let-rowIndex="rowIndex">
<tr [pSelectableRow]="product" [pSelectableRowIndex]="rowIndex">
<td>{{product.code}}</td>
<td>{{product.name}}</td>
<td>{{product.category}}</td>
<td>{{product.quantity}}</td>
</tr>
</ng-template> We have to use @kvea2git did you add these? |
Beta Was this translation helpful? Give feedback.
-
I had omitted the iterator variable on the body template. I had
where I needed
I should have put more of the p-table code on the question. This did work before the framework upgrade. I edited it for other reasons and introduced this. Thanks anyway |
Beta Was this translation helpful? Give feedback.
I had omitted the iterator variable on the body template. I had
where I needed
I should have put more of the p-table code on the question. This did work before the framework upgrade. I edited it for other reasons and introduced this. Thanks anyway