anonymous value fixed

This commit is contained in:
Ste Vaidis 2023-09-17 11:14:25 +03:00
parent dac51ed4a4
commit a60974485f
2 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export const Checkbox = React.forwardRef(
value, value,
placeholder, placeholder,
name, name,
checked,
getRef, getRef,
label, label,
onClick, onClick,
@ -38,6 +39,7 @@ export const Checkbox = React.forwardRef(
onChange={onChange} onChange={onChange}
ref={checkboxRef} ref={checkboxRef}
className="sr-only" className="sr-only"
checked={checked}
/> />
<div className="toggle-bg bg-black h-6 w-11 rounded-full"></div> <div className="toggle-bg bg-black h-6 w-11 rounded-full"></div>
<span className="ml-3 text-white text-sm font-medium"> <span className="ml-3 text-white text-sm font-medium">

View File

@ -142,6 +142,7 @@ const Create = (props) => {
id='anon' id='anon'
label="Hide voters names (Anonymous voting)" label="Hide voters names (Anonymous voting)"
onChange={handleAnonymous} onChange={handleAnonymous}
checked={formData.anonymous}
/> />
</div> </div>
<div className="mt-2"> <div className="mt-2">
@ -153,6 +154,7 @@ const Create = (props) => {
/> />
</div> </div>
</form> </form>
{JSON.stringify(formData)}
</div> </div>
); );
} }