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

Indeterminate checkbox state #1080

Open
jes708 opened this issue Jun 17, 2021 · 1 comment
Open

Indeterminate checkbox state #1080

jes708 opened this issue Jun 17, 2021 · 1 comment

Comments

@jes708
Copy link
Collaborator

jes708 commented Jun 17, 2021

When a checkbox has child checkboxes which are checked, that checkbox should have an indeterminate state to signify that some of its children are checked. This is especially important if the parent checkbox exists as part of an accordion, and the accordion is closed, yet some of its children are checked.

In this image, SUV should have an indeterminate state.
Screen Shot 2021-06-17 at 12 44 46 PM

This image shows an example of an indeterminate state.
image

@dansternfeld1
Copy link
Collaborator

Nice idea, @jes708!

A few thoughts I'll throw out there:

  • It should probably apply specifically to a "mixed-checked" state; if all sub-options are selected, the parent checkbox should just be checked, and if none are selected, it should be unchecked.
  • It might be worth making the new mark an intermediate color if it works visually & improves the legibility of this new state.
  • I think a prop would be needed to determine whether to check or uncheck all child boxes when clicking on a parent checkbox that's in this new state, as I could see valid use cases for either approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants