useFieldArray append not working properly #2840
-
Hi there, I'm having a problem with What it does is, that it logs the new project properly before Am I doing something wrong? Here is codesandbox: https://codesandbox.io/s/beautiful-banzai-b4jbk?file=/src/App.tsx Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
each useFildArray host its own FieldArray, you will have to do an append at your child field array's. useEffect(() => {
append({})
}, [append]) more on this, next update you can use
|
Beta Was this translation helpful? Give feedback.
-
in my case i created a custom hook that was returning the return value of Basically I had to delete the hook entirely and pass the return value of |
Beta Was this translation helpful? Give feedback.
each useFildArray host its own FieldArray, you will have to do an append at your child field array's.
more on this, next update you can use
setValue
: #2691setValue('fieldArray', whateverDataHere)