| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
PatternFly-React preview: https://2252-pr-patternfly-react-patternfly.surge.sh |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #2252 +/- ##
==========================================
- Coverage 79.89% 79.87% -0.02%
==========================================
Files 669 669
Lines 8529 8531 +2
Branches 734 735 +1
==========================================
Hits 6814 6814
- Misses 1362 1363 +1
- Partials 353 354 +1
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
@rachael-philips this is just a JS update no need to change or anything in core it uses indeterminate API od checkbox [1]. [1] https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate |
Sorry, something went wrong.
|
Thanks for the explanation @karelhala ! |
Sorry, something went wrong.
|
I am fine to introduce this directly into React. We may decide to revisit this later based on the discussion here: patternfly/patternfly#1411 |
Sorry, something went wrong.
| id="check-2" | ||
| name="check2" | ||
| /> | ||
| <Checkbox |
There was a problem hiding this comment.
would be good to wrap 2 checkboxes inside the checkbox and show the indeterminate state live. And can also get rid of several other duplicate examples
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah! That's a good point. I like it!
Sorry, something went wrong.
| aria-invalid={!isValid} | ||
| aria-label={ariaLabel} | ||
| disabled={isDisabled} | ||
| ref={elem => elem && (elem.indeterminate = isChecked === null)} |
There was a problem hiding this comment.
What's this ref needed for?
Sorry, something went wrong.
There was a problem hiding this comment.
This prop is can't be set trough react prop for some reason [1]. However plain js api allows to set it trough element, so this ref is to access checkox element. It's probably because indeterminate is a flag and not real prop though.
[1] react/react#1798
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What:
When using checkbox as hierarchical checkbox (parent checkbox with child checkboxes) and user selects only some of child checkboxes parent one should go to 3rd state to indicate user that only some checkboxes were selected.
Additional issues: