react-hook-form: remove from useFieldArray doesn't work correctly
Please consider asking the question at our spectrum channel.
https://spectrum.chat/react-hook-form
Describe the question?
To Reproduce Steps to reproduce the behavior:
- use
useFieldArray - Append new members
removeing doesn’t work as expected, deletes other members than the one needed
Codesandbox link (Required) https://codesandbox.io/s/react-hook-form-usefieldarray-zs0lp
Additional context
I couldn’t replicate my issue as I experienced it, but I also had an issue where removeing a member would completely wipe my array
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 10
- Comments: 26 (12 by maintainers)
make sure you go through the doc with the important note, i think you are missing the
id@bluebill1049 Wow, that was it. Must’ve missed it. Thanks for the thorough documentation ❤️.
maybe try to follow the CSB example, see if you can achieve similarly?
Thank you for being so responsive!
I have a form for creating an array of floors like so:
With each floor having fields like so:
Once I try to remove one of the floors I’ve added, I get my whole array wiped like so: before:
after: