Final form Field with type=checkbox not work with format props

261 views Asked by At

I found that format does not work when we use in the type=checkbox Field.

I have this snippet for example

 <Field
       name="gender"
       component="input"
       type="checkbox"
       format={value => {
          return false
       }}
       parse={v => (v ? "foo" : "bar")}
/>

Following this example, the checkbox should always be unchecked because I force it to false in format props, but I can still toggle the check status of checkbox

0

There are 0 answers