Skip to content

Commit 7fec59f

Browse files
author
Sravan S
authored
fix: Checkbox: set checked as false (#403)
To remove warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.
1 parent ca57dcd commit 7fec59f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui/Checkbox/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface CheckboxProps {
1010

1111
export default function Checkbox({
1212
id,
13-
checked,
13+
checked = false,
1414
disabled,
1515
onChange,
1616
}: CheckboxProps): ReactElement {

0 commit comments

Comments
 (0)