swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

chkbox-selection footer not updating with Select All + disabled row #2020

Open thiagonsiq opened 3 years ago

thiagonsiq commented 3 years ago

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:

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

Chrome

ngx-datatable-bug

thiagonsiq commented 3 years ago

Any ideas here?

Sor0 commented 2 years ago

i have similar issue when y have checked a row and uncheck this selected label is not updated

venimus commented 1 year ago

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"