I am using PrimeNg table component and needs to implement row selection. I have the following code:
<p-table
[value]="data"
[columns]="columns"
[(selection)]="selectedItems"
selectionMode="multiple">
<ng-template pTemplate="header">
<tr>
<th>
<p-tableHeaderCheckbox style="margin-left: 5px;"></p-tableHeaderCheckbox>
</th>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-row>
<tr [pSelectableRow]="row">
<td>
<p-tableCheckbox [value]="row"></p-tableCheckbox>
</td>
<td>Value 1</td>
<td>Value 2</td>
</tr>
</ng-template>
</p-table>
Basically, I am using the Checkbox selection and multiple selection without metakey as given in the documentation here. Now when I click on the row, it is selecting and the checkbox is also checked. But when I click on the checkbox, it is not getting selected. If I click on the Select All, then also it is selecting all the rows. When I checked using Developer Tools, it is not making the aria-checked to true even though the click is detected.
Any workaround for fixing this issue?