material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Allow headerSelectionProps to receive a function and row data

Open chris-jalon opened this issue 5 years ago • 1 comments

To expand on behavior created in https://github.com/mbrn/material-table/issues/610, allow the headerSelectionProps option to also accept a function like selectionProps does, where the argument would be filtered rows the way onSelectionChange does.

https://github.com/mbrn/material-table/blob/b7474ca0f5497f04ff3a3d50e709d86de7c639b0/src/components/m-table-header.js#L270 will need similar functionality as https://github.com/mbrn/material-table/blob/b7474ca0f5497f04ff3a3d50e709d86de7c639b0/src/components/m-table-body-row.js#L109-L112

This will allow dynamic header checkbox state based on filtered or independent row data.

This relates to https://github.com/mbrn/material-table/issues/2969, which addresses the broken checked and indeterminate states of header selection checkbox when filtering data.

chris-jalon avatar Jul 29 '21 18:07 chris-jalon

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.

stale[bot] avatar Oct 27 '21 23:10 stale[bot]