Skip to content

Commit

Permalink
fix(Checkbox): fix issue with controlled indeterminate state (#13872)
Browse files Browse the repository at this point in the history
* fix(Checkbox): fix issue with controlled indeterminate state

* refactor(Checkbox): remove test story

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
tw15egan and kodiakhq[bot] authored May 25, 2023
1 parent b8701c9 commit 97b6ca3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ const Checkbox = React.forwardRef(
className={`${prefix}--checkbox`}
id={id}
ref={(el) => {
if (el && indeterminate) {
el.indeterminate = indeterminate;
if (el) {
el.indeterminate = indeterminate ?? false;
}
if (typeof ref === 'function') {
ref(el);
Expand Down

0 comments on commit 97b6ca3

Please sign in to comment.