Conversation
nicko-winner
commented
Jul 19, 2020

|
Deploy preview for helix-react ready! Built with commit 09b34a6 |
| const Checkbox = ({ id, label, className, indeterminate, ...rest }) => { | ||
| const inputRef = useRef(); | ||
| useEffect(() => { | ||
| inputRef.current.indeterminate = indeterminate; |
There was a problem hiding this comment.
@nicko-winner, is this feedback for the HelixUI docs or something we should document here (or both)?
There was a problem hiding this comment.
It's a nit for the helix UI docs. I might have just have been trying silly things late in the day, but I tried to set the indeterminate prop on a few wrong elements before I got it working on the input. If the docs are explicit about what element to place indeterminate on it might take some ambiguity out of it. Not many people will likely need to use that state, but for those that do maybe someone will try the same foolishness I did.
There was a problem hiding this comment.
In Helix React we hide this implementations detail from users, so they won't have to deal with it, just Helix UI users.
There was a problem hiding this comment.
Ok thanks for the feedback. Yes, I agree we need to make this more explicit in the HelixUI documentation.
| const Checkbox = ({ id, label, className, indeterminate, ...rest }) => { | ||
| const inputRef = useRef(); | ||
| useEffect(() => { | ||
| inputRef.current.indeterminate = indeterminate; |
There was a problem hiding this comment.
@nicko-winner, is this feedback for the HelixUI docs or something we should document here (or both)?
