useForm 的默认值未使用 useFormContext 正确更新
DefaultValues from useForm is not updated correctly with useFormContext
参见示例:https://codesandbox.io/s/sad-franklin-d4o5z
useForm 中设置的默认值本身工作正常。但是,当它与 useFormContext 一起使用时,它无法正常运行;因为它只需要第一个初始化。值。
在示例中,当弹出对话框时,目标值更改为“test”,我希望该值也被“test”填充。但是,它没有用。
参见示例:https://codesandbox.io/s/sad-franklin-d4o5z
useForm 中设置的默认值本身工作正常。但是,当它与 useFormContext 一起使用时,它无法正常运行;因为它只需要第一个初始化。值。
在示例中,当弹出对话框时,目标值更改为“test”,我希望该值也被“test”填充。但是,它没有用。