Closed JoaoZanetti closed 2 years ago
Can't reproduce. This example is working:
const [form] = Form.useForm();
React.useEffect(() => {
const interval = setInterval(() => {
form.setFieldsValue({phone: `${Math.random()*1000}`})
}, 700);
return () => clearInterval(interval)
}, [])
return <Form form={form}>
<Form.Item
label="Phone"
name="phone"
initialValue={'11'}
>
<DynamicPhone />
</Form.Item>
</Form>
I would recommend you to check your antd version or log Object.keys(newObj)
The version 2.0.0 Requires antd >= 4.19.0 - for previous versions use the version 0.1.15
I'm submitting a ... [ ] bug report [X] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
When I try to use the setFieldsValue function from Form object fields don't get populated.