tl;dr
Add valuePropName="checked"
to the Form.Item
component:
<Form.Item name="isAccepted" valuePropName="checked">
Explanation
A checkbox's value is not stored in a value
attribute like for text inputs. Instead, it has a checked
attribute. You have to tell the Form.Item
component to set that attribute/prop by telling the prop's name through valuePropName
.
The docs on Form.Item
describes this prop:
valuePropName
: Props of children node, for example, the prop of Switch is 'checked'. This prop is an encapsulation ofgetValueProps
, which will be invalid after customizinggetValueProps
Later it describes how the wrapping happens:
After wrapped by
Form.Item
withname
property,value
(or other property defined byvaluePropName
)onChange
(or other property defined bytrigger
) props will be added to form controls, the flow of form data will be handled by Form...