remove from useFieldArray doesn't work correctly
See original GitHub issuePlease 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
remove
ing 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 remove
ing a member would completely wipe my array
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:26 (12 by maintainers)
Top Results From Across the Web
UsefieldArray react hook form deleting the last element only
Basically I'm trying to append and delete but the problem is when I'm deleting its deleting only the last element. append is working...
Read more >React Hook Form - useFieldArray - Remove ERROR
A custom hook for working with Field Arrays (dynamic inputs). ... Forked FromReact Hook Form - useFieldArray; Environmentcreate-react-app.
Read more >useFieldArray - Simple React forms validation
Performant, flexible and extensible forms with easy-to-use validation.
Read more >Problem with useFieldArray with react-hook-form - JavaScript
For some reason I have a particular form setup with useFieldArray but the remove/append method is bugged. I have not encounter this problem ......
Read more >Form - Atom Learning
You don't need to pass error to your component manually; the Form will pass it in ... to make the dynamic fields work...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 ❤️.