Repository navigation
feat(checkbox): implement indeterminate state - #16951
brandyscarney merged 26 commits into
Conversation
This adds an `indeterminate` prop to the `ion-checkbox` component, which visually renders the checkbox with a dash to indicate an indeterminate state. Closes #16943.
|
@brandyscarney could you have a look at this please? We want to use this in our app and would prefer I can work on getting this PR ready if any changes are required. |
|
Thanks for the PR! I plan to review this soon. Sorry for the delay. 🙂 |
|
Also, we are planning on removing the |
|
ok will do that later... my screenshots were taken in chrome though, so not sure why it wouldn’t work for you? anyway i’ll make sure it’ll work in safari and firefox as well. |
|
This is such a great PR! Nice work. I am going to take a look at this now and make some changes to the tests. Just letting you know so we don't do twice the work. 🙂 |
I updated the code that was reviewed
|
I made some changes to the CSS to add back some things that were removed. I believe I added a native indeterminate checkbox example to the test here: This shows that our determinate checkboxes are behaving the same as native. I also added a parent/child example and it seems to be working as expected. Please let me know if you're seeing any problems with my changes, otherwise it should be good to go. Thank you!! |
|
Yup looks great, thanks for your work! |
|
Thank you 🎉 |





Short description of what this resolves:
Implements an indeterminate state for checkboxes.
Changes proposed in this pull request:
This adds an
indeterminateprop to theion-checkboxcomponent, which visually renders the checkbox with a dash to indicate an indeterminate state.For MD styles I followed Material specs (see section "Parent and child checkboxes") and the Material Components for Web implementation to implement the dash according to the specs. For iOS styles I had a look at https://github.com/Marxon13/M13Checkbox.
Should I add an E2E test for the most common use case of it, which is a nested tree of checkboxes? That's why I'm submitting this anyway, because we need it for our work.
One change I am not totally sure about is that I had to remove
position: staticfor checkboxes within items. Not sure why it was there in the first place because it seems to work fine withposition: relative, however I assume there was a reason for this?Ionic Version:
4.0.0-rc.0Closes: #16943