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

cellContext in DataTableHeaderCellComponent is not updated #948

Open artvitk opened 7 years ago

artvitk commented 7 years ago

I'm submitting a ...

[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

Looks like values in cellContext property of DataTableHeaderCellComponent are never updated after component initialization. https://github.com/swimlane/ngx-datatable/blob/a8d3e26c868964d5b1533508930d754172543cb4/src/components/header/header-cell.component.ts#L149-L155 For example, if selectionType is 'checkbox' and all rows are selected manually then checkbox in header isn't checked. ngx-datable-bug

Expected behavior

cellContext should be updated when input properties of DataTableHeaderCellComponent are updated

Reproduction of the problem http://plnkr.co/edit/gKXQhgYxQ9HbpNMfb3NQ?p=preview

What is the motivation / use case for changing the behavior?

allRowsSelected in custom template should be updated

Please tell us about your environment:

Windows 10, npm, webpack

mishkolesnikov commented 7 years ago

Led to #935.

reneefeng commented 7 years ago

I have the same question...Have you settled it yet? @artvitk

artvitk commented 7 years ago

@ReneeFeng I still use 9.3.1 version