Header's Select All checkbox breaks "selected" model binding
See original GitHub issueI’m submitting a … (check one with “x”)
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
When I check the header’s “Select All” checkbox, the [selected]
model is not updated and never updated again.
When I check individual rows, the selected
model is updated as long as I do not check the header’s Select All.
The footer’s selected count is still updated as expected.
Handling the (select)
output with the splice/push
combo as in the demo, is the way around it, but the documentation is pretty unclear.
Note: Maybe related to #818, I’m unsure…
Expected behavior
The header’s “Select All” checkbox should update the selected
model.
Reproduction of the problem I reproduced it here: https://plnkr.co/5NHahUqqU1NVW2dH
What is the motivation / use case for changing the behavior? It really looks broken… it half works, then stops without any error message in the logs.
Please tell us about your environment:
-
Table version: “@swimlane/ngx-datatable”: “^13.1.0”
-
Angular version: Angular 6.1.3
-
Browser: Tried in Chrome 68.0.3440.106 and Edge 42.17134.1.0
-
Language: All
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:7
Top GitHub Comments
@james-poulose, as mentioned in the original issue:
i.e. this one: http://swimlane.github.io/ngx-datatable/#chkbox-selection
And the relevant code is:
https://user-images.githubusercontent.com/3278913/110382838-2291d680-8064-11eb-995b-814a17cedf38.mov
My
onSelect
method:My datatable: