Skip to content

Commit 87af126

Browse files
authored
Merge pull request #894 from kleros/fix(web)/checkboxes-value-error
fix: checkbox uncontrolled error
2 parents f2a2daa + a34455e commit 87af126

File tree

1 file changed

+1
-1
lines changed
  • web/src/layout/Header/navbar/Menu/Settings/SendMeNotifications/FormNotifs

1 file changed

+1
-1
lines changed

web/src/layout/Header/navbar/Menu/Settings/SendMeNotifications/FormNotifs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const EmailErrorContainer = styled.div`
3636
const OPTIONS = [{ label: "When x." }, { label: "When y." }, { label: "When z." }, { label: "When w." }];
3737

3838
const FormNotifs: React.FC = () => {
39-
const [checkboxStates, setCheckboxStates] = useState<boolean[]>(new Array(OPTIONS.length));
39+
const [checkboxStates, setCheckboxStates] = useState<boolean[]>(new Array(OPTIONS.length).fill(false));
4040
const [emailInput, setEmailInput] = useState<string>("");
4141
const [emailIsValid, setEmailIsValid] = useState<boolean>(false);
4242

0 commit comments

Comments
 (0)