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

Remove mutator does not remove the correct field #49

Open
JVallius opened this issue Mar 6, 2020 · 0 comments
Open

Remove mutator does not remove the correct field #49

JVallius opened this issue Mar 6, 2020 · 0 comments

Comments

@JVallius
Copy link

JVallius commented Mar 6, 2020

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

Removing a field using remove mutator does not remove the correct field from the screen, if the fields are re-arranged using move mutator before removing.

What is the expected behavior?

Correct field is removed from the screen

Sandbox Link

To reproduce the bug:
https://codesandbox.io/s/final-form-arrays-bug-x17sb

  1. Create two customers => (order: 1,2)
  2. Reorded customers by dragging => (order: 2,1)
  3. Remove Customer#2 by clicking red cross
  4. Customer#1 is removed from the screen instead of Customer#2

What's your environment?

The bug can be reproduced using final-form-arrays version from 1.2.0 to 3.0.2
Version 1.1.2 is working as expected

"final-form": "4.18.7",
"final-form-arrays": "3.0.2",
"react": "16.12.0",
"react-beautiful-dnd": "13.0.0",
"react-dom": "16.12.0",
"react-final-form": "6.3.5",
"react-final-form-arrays": "3.1.0",

Other information

Final Form state seems to be updated correctly (as seen in sandbox example). But somehow Field components doesn't get updated with those values.

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

1 participant