I'm having issues while setting the checkboxes inititial values as true, and when resetting the form setting them back to their initial values:
https://codesandbox.io/s/l98zymm147
Is there something missing?
Thanks
/edit: digging a little bit more, moved the input to a component to test it a little bit more, and found that the onChange event is not firing. May be related?
In React, checkboxes don't use a value prop, but instead require checked. https://reactjs.org/docs/forms.html#handling-multiple-inputs
So just set checked={values.check} in your code sandbox
I also noticed this behavior. Would anyone be open to a change where "checked" was set instead of "value" if the type is "checkbox"?
Yeah, this is fine if you're using basic input elements, but it seems weird that
See answer in this comment: https://github.com/ant-design/ant-design/issues/7481#issuecomment-434219642
Cheers jaredpalmer. It's useful to know values is accessible:
checked={values.check}
Most helpful comment
Yeah, this is fine if you're using basic input elements, but it seems weird that doesn't just figure this out automatically. Could we reopen this?