Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support indeterminate header level checkbox #3058

Open
paustint opened this issue Oct 22, 2022 · 0 comments · May be fixed by #3114
Open

Support indeterminate header level checkbox #3058

paustint opened this issue Oct 22, 2022 · 0 comments · May be fixed by #3114

Comments

@paustint
Copy link

paustint commented Oct 22, 2022

Use case

I would like to display an indeterminate checkbox in the header if some, but not all rows are selected.

Proposed solution

I am using a custom Checkbox header, so for my use-case I would only need an additional property someRowsSelected: boolean; added to HeaderRendererProps so that I could determine if some, but not all, rows are selected.

image

paustint added a commit to paustint/react-data-grid that referenced this issue Dec 25, 2022
Added someRowsSelected property to DataGrid to determine if indeterminate

Provide someRowsSelected as a new property to HeaderRendererProps

Automatically set indeterminate property on built-in or overridden checkboxFormatter
as long as the ref exists and the ref component has a property named `indeterminate`
(e.x. input component)

Fixed typo in comment

resolves adazzle#3058
@paustint paustint linked a pull request Dec 25, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant