For some reason I have a particular form setup with useFieldArray but the remove/append method is bugged. I have not encounter this problem with other forms using useFieldArray so I am not sure if it is an isolated case.
I have a sandbox link showing the problem with remove an item in the useFieldArray:
Step of reproducing the bug:
- Append a few arrays
- Remove an array
- Append again and you will see in the console that all other field arrays beside the new one becomes null for some reason.
I am using react-hook-form 6.13.1 since the new versions breaks a number of stuff in my existing forms so I do not plan to upgrade the version at the moment…
How can I fix this?