Skip to content

Commit

Permalink
Addon-controls: Fix uncontrolled to controlled warning for booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Aug 31, 2020
1 parent 4255133 commit 92aff2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/src/controls/Boolean.tsx
Expand Up @@ -86,7 +86,7 @@ export const BooleanControl: FC<BooleanProps> = ({ name, value, onChange, onBlur
id={name}
type="checkbox"
onChange={(e) => onChange(e.target.checked)}
checked={value}
checked={value || false}
{...{ name, onBlur, onFocus }}
/>
<span>True</span>
Expand Down

0 comments on commit 92aff2d

Please sign in to comment.