-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: indeterminate Checkbox #444
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
Conversation
satya164
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thanks for the PR. I think instead of having 2 props, having a single prop would be better, because checked and indeterminate don't mean anything together because indeterminate means that the state is unknown.
status: 'checked' | 'unchecked' | 'indeterminate'We should do the same for radio :)
|
Hm, I'm not sure if that's a good idea from a developer perspective since he needs to handle strings instead of truthy/falsey values. |
|
It's a minor inconvenience, but better than an inconsistent API IMO. Having two separate props which control the same thing also means that people who actually use the It's also easier to introduce bugs when 2 props control the same state. |
|
@satya164 just implemented the changes as suggested :) The indeterminate status for radio buttons is by the way not part of the specs (https://material.io/design/components/selection-controls.html#radio-buttons). |
|
@satya164 can you re-check? |
|
@satya164 any chance to have a look at it for the 2.0 release? |
|
merged in 3b09171 |
Motivation
Implement indeterminate Checkboxes according to:
https://material.io/design/components/selection-controls.html#checkboxes
Test plan