you will need to use defaultValue
for input for useFieldArray
. especially when you delete, shuffle and swap inputs.
#1756
-
you will need to use Originally posted by @bluebill1049 in #1529 (comment) Hi, with regards to this, is there a way so that I can use reset method returned from useForm hook to change the fields returned from useFieldArray hook? From my understanding, useFieldArray takes in control method returned from useFrom hook and parse it to return the fields. However, when I call the reset with useEffect, I am facing issues making the useFieldArray's control parameter to update. My goal is to obtain a new set of fields from useFieldArray when the useForm's defaultValue parameter is updated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
please provide a simple codesandbox for your question. |
Beta Was this translation helpful? Give feedback.
please provide a simple codesandbox for your question.