Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Deletion doesn't work properly in Array Support #30

Open
LarsArtmann opened this issue Sep 17, 2023 · 1 comment
Open

[Bug] Deletion doesn't work properly in Array Support #30

LarsArtmann opened this issue Sep 17, 2023 · 1 comment

Comments

@LarsArtmann
Copy link

Just tried the Array Support on the demo website.

Screenshot 2023-09-17 at 17 26 08

When I deleted the first entry this happened:

Screenshot 2023-09-17 at 17 29 21

You can see the first entry is this there but the second one was 'delete'. If you look closely you can see it only removed it from the ui not the json underneath. After clicking the add button again it magically reappears.

Screenshot 2023-09-17 at 17 31 17

After testing with 3 entries, it looks like the delete button always (no matter witch entry) deletes the last entry (from the ui only)

@teoboetti
Copy link

Searching on react-hook-form, this should be the fix

targerian1999 added a commit to targerian1999/auto-form that referenced this issue Feb 29, 2024
fix deletion of correct array elements and address this issue (vantezzen#30 (comment))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants