Skip to content

Commit

Permalink
[Addon-knob] Fix uncontrolled to controlled warning for booleans
Browse files Browse the repository at this point in the history
Same as storybookjs#12322 to fix knob addon
  • Loading branch information
cyrus committed Oct 9, 2020
1 parent 59e41a0 commit 17f4ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/knobs/src/components/types/Boolean.tsx
Expand Up @@ -35,7 +35,7 @@ const BooleanType: FunctionComponent<BooleanTypeProps> & {
name={knob.name}
type="checkbox"
onChange={(e) => onChange(e.target.checked)}
checked={knob.value}
checked={knob.value || false}
/>
);

Expand Down

0 comments on commit 17f4ae2

Please sign in to comment.