[x ] bug report => Search github for a similar issue or PR before submitting
I am facing a problem on PrimeNG TurboTable.
I started from the following example: https://www.primefaces.org/primeng/#/table/selection and more particularly from the Checkbox Selection example.
The only difference is that on some p-tableCheckbox I added a [disabled]="true"

This works very well if I select a disabled line it does not activate and can not be selected, but when I click on p-tableHeaderCheckbox all the lines are selected even the lines in disabled.

In addition, the selection also counts the lines in status disabled or it should only take lines with no status disabled I made an example on stackblitz : https://stackblitz.com/edit/angular-gnbsml?file=src%2Fapp%2Fapp.component.html
How to prevent tableHeaderCheckbox from also selecting disable lines?
Thank you in advance for your answers
This issue persists in 7.0 and would help my users greatly if fixed please!
+1
Please add this. It would be a great addition. We can have additional configuration options, something like this <p-table [selectDisabledRows]="true/false"></p-table> to indicate <p-tableHeaderCheckbox></p-tableHeaderCheckbox> not to select disabled rows.
@Merve7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
A PR has been made to fix this, in the meantime it's available here: https://github.com/yelhouti/primeng/releases/download/8.0.2/primeng-8.0.3-SNAPSHOT.tgz
Hi guys, can you please tell is there date when PR from @yelhouti plan to be merged?
@kramar they are not planning to merge it, looking for a better alternative
@yelhouti Got it, thank you.
Any updates on this issue? I haven't been able to find a workaround and this is severely affecting our user experience when we use the <p-table>.
The setting "pSelectableRowDisabled" should also be taken into account.
any updates on this issue?
+1
A workaround that we are using is to have an additional "selected" list in the component and updating it with (onRowSelect)="rowSelected($event)" and (onRowUnselect)="rowUnselected($event)"
While on the row checkbox we have the following:
<p-tableCheckbox
[value]="rowData['disabled'] ? {} : rowData"
[disabled]="rowData['disabled']">
</p-tableCheckbox>
But this workaround will not mark the header checkbox (select all) in case all of the enabled rows were selected
A workaround that we are using is to have an additional "selected" list in the component and updating it with
(onRowSelect)="rowSelected($event)"and(onRowUnselect)="rowUnselected($event)"While on the row checkbox we have the following:
<p-tableCheckbox [value]="rowData['disabled'] ? {} : rowData" [disabled]="rowData['disabled']"> </p-tableCheckbox>But this workaround will not mark the header checkbox (select all) in case all of the enabled rows were selected
Any update on when this feature will be introduced?
Or if any workaround is available currently without this drawback?
Hi,
is there going to be a solution anytime soon?
Hi,
Any updates on this issue?
Hi,
any solution anytime soon?
Most helpful comment
+1
Please add this. It would be a great addition. We can have additional configuration options, something like this
<p-table [selectDisabledRows]="true/false"></p-table>to indicate<p-tableHeaderCheckbox></p-tableHeaderCheckbox>not to select disabled rows.@Merve7