ngx-datatable
ngx-datatable copied to clipboard
chkbox-selection footer not updating with Select All + disabled row
I'm submitting a ... (check one with "x")
[X] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior Repro steps:
- Grid uses multi-checkbox, for instance, to display 100 items
- One row is disabled using condition with displayCheck
- User checks the "Select All" checkbox at the top of the grid to select all rows (except disabled rows)
- Using "selectCheck" I can filter out the disabled rows
- BUG - At this point, the footer will show 100 selected / 100 total
Expected behavior
The expected behavior is that if there are 100 total items and one row is disabled, if the Select All checkbox is checked, then the footer should display only the count of actual selected items.
Reproduction of the problem
The bug can be reproduced via ngx-datable's own demo on your website: http://swimlane.github.io/ngx-datatable/#chkbox-selection
Screenshot attached to illustrate further.
What is the motivation / use case for changing the behavior?
To display correct information on the footer of the grid.
Please tell us about your environment:
VSCode/Angular 12
-
Table version: @swimlane/[email protected]
-
Angular version: Angular 12
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome
- Language: [all | TypeScript X.X | ES6/7 | ES5] All

Any ideas here?
i have similar issue when y have checked a row and uncheck this selected label is not updated
it's 2023 this issue is still there. I use
onSelect({ selected }) {
this.selected.splice(0, this.selected.length);
this.selected.push(...selected.filter(this.displayCheck));
}
but visually it is awkward
seems that the problem is that selectCheck is not called for "select all"