useEffect(() => form.resetFields(), [initialValues])
I had the same problem, sometimes the initialValues are empty, and I need to fetch the initialValues form a remote server.
initialValues
I've fixed it in this way