Skip to content

Commit

Permalink
fix: πŸ› using indeterminate on checkbox when partial true
Browse files Browse the repository at this point in the history
βœ… Closes: #1146
  • Loading branch information
emersonlaurentino committed Apr 13, 2020
1 parent 7e4beec commit 17daad0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion react/components/Checkbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ class Checkbox extends PureComponent {
</div>
<input
checked={checked}
ref={forwardedRef}
ref={elem => {
elem && (elem.indeterminate = !checked && partial)
forwardedRef && (forwardedRef.current = elem)
}}
className={classNames('h1 w1 absolute o-0', {
pointer: !disabled,
})}
Expand Down

0 comments on commit 17daad0

Please sign in to comment.