[6.14.2] useWatch on a field value always gets its defaultValue after removing other field #4081
Unanswered
github0013
asked this question in
General
Replies: 2 comments 16 replies
-
This is a bug, which has been patch. i will release it today. |
Beta Was this translation helpful? Give feedback.
14 replies
-
also, FYI useFieldArray is getting a lot of improvement in v7: #3714 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://codesandbox.io/s/festive-pike-j1eg5?file=/src/App.tsx
This form has a regular form value (form name) + field array.
name: name default (index: 1)
which is coming from useWatch's defaultValueI am not sure if this is a bug, or I am mis-using these methods.
(handleSubmit's data value gets what I see in the form though...)
ref={register()}
on fieldsdefaultValue
on fieldsDid anyone have the same issue?
Beta Was this translation helpful? Give feedback.
All reactions