jsun969 / react-hook-form-antd

📋🐜 Master your Ant Design form with React Hook Form! 用 React Hook Form 拿捏你的 Ant Design 表单!
https://npm.im/react-hook-form-antd
MIT License
61 stars 10 forks source link

MISC - watch react-hook-form field value change #4

Closed cenxky closed 1 year ago

cenxky commented 1 year ago

Fix #3

jsun969 commented 1 year ago

Thx for your PR!

https://github.com/jsun969/react-hook-form-antd/blob/56e65748338afe63f64f42ec2d73c781c0bef11a/example/src/App.tsx#L19

Please add an example here for reset

cenxky commented 1 year ago

Hi @jsun969, here is the codesandbox example: https://codesandbox.io/s/falling-tree-mnwnhk?file=/src/FormExample.tsx

cenxky commented 1 year ago

It seems I misunderstood your points, I'll update the example inside this repo.

jsun969 commented 1 year ago

sry for my late reply. Could you tell me why close this PR? 🥲

cenxky commented 1 year ago

sry for my late reply. Could you tell me why close this PR? 🥲

Hey @jsun969, while doing the manual test after finishing the PR, I found there are still some problems between the new FormItem with react-form-hook, such as reset({}) not working as expected. I guess there might be something else that needs to be fixed, possibly related to initValue. However, I was not able to conduct a thorough investigation due to lack of time. Hence, I decided to close the PR as it was not complete. I believe you have the ability to figure out and resolve the issues on your own.