Append Uses Default Value #8364
Unanswered
sethdumaguin
asked this question in
General
Replies: 2 comments
-
You should provide the default input's value when appending the field: an empty string for a string input, for example. From RHF useFieldArray docs: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 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.
-
Hi!
So I have a useFieldArray form with defaultValues. When I remove a field and then append, the appended input still uses the defaultValue, but I would want it to be empty. Is there a way for the field array inputs to not use the defaultValue anymore once they are removed?
Appreciate the help!
See example below:
https://codesandbox.io/s/react-hook-form-usefieldarray-forked-t1xl9o?file=/src/index.js
Beta Was this translation helpful? Give feedback.
All reactions