Header selection checkbox should reflect filtered data
When filtering a table, the header selection checkbox does not reflect filtered data.
Sandbox to reproduce: https://codesandbox.io/s/material-table-header-selection-checkbox-filter-example-v6pw7
To reproduce:
- View a table with many selectable rows
- Select all rows using the header checkbox
- Apply a filter so that only some rows are displayed (in the example, type
24in the search box) - See that header selection checkbox is not checked even though all row checkboxes are.
Expected behavior: Header selection checkbox should reflect filtered items (including those on other pages, if paging enabled)
The logic here is compares the count of filtered rows to all rows of data: https://github.com/mbrn/material-table/blob/b7474ca0f5497f04ff3a3d50e709d86de7c639b0/src/components/m-table-header.js#L259-L266 so the checkbox remains unchecked.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.