From a60974485f65bb33b2882eda67d86b0f006362e3 Mon Sep 17 00:00:00 2001 From: Ste Vaidis Date: Sun, 17 Sep 2023 11:14:25 +0300 Subject: [PATCH] anonymous value fixed --- src/ui/checkbox.jsx | 2 ++ src/view/Create.jsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ui/checkbox.jsx b/src/ui/checkbox.jsx index e5e9c17..022e20f 100644 --- a/src/ui/checkbox.jsx +++ b/src/ui/checkbox.jsx @@ -11,6 +11,7 @@ export const Checkbox = React.forwardRef( value, placeholder, name, + checked, getRef, label, onClick, @@ -38,6 +39,7 @@ export const Checkbox = React.forwardRef( onChange={onChange} ref={checkboxRef} className="sr-only" + checked={checked} />
diff --git a/src/view/Create.jsx b/src/view/Create.jsx index 4e732f0..e39bb11 100644 --- a/src/view/Create.jsx +++ b/src/view/Create.jsx @@ -142,6 +142,7 @@ const Create = (props) => { id='anon' label="Hide voters names (Anonymous voting)" onChange={handleAnonymous} + checked={formData.anonymous} />
@@ -153,6 +154,7 @@ const Create = (props) => { />
+ {JSON.stringify(formData)} ); }