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

form.getFieldState is corrupted after removing element arrays.remove #165

Open
zizizi17 opened this issue Jul 18, 2021 · 0 comments
Open

Comments

@zizizi17
Copy link

zizizi17 commented Jul 18, 2021

Are you submitting a bug report or a feature request?

bug report

What is the current behavior?

I have the form with FIeldArray component inside.

  • "append customer" ie adding new element to array.
  • click on the Set Field Data Here span -> it set the data: { disabled: true }(check in console after next step to ensure data is set) to the the element with 0 index
  • then append a new one(index 1).
  • click Set Field Data Here
  • after that - click X to delete the element with index 0.

In console - check for the the the logging of the zero element(previous first one) -> data: {}.

What is the expected behavior?

In console - check for the the the logging of the zero element -> data: { disabled: true }.

Sandbox Link

https://codesandbox.io/s/react-final-form-field-arrays-forked-dythr?file=/index.js

What's your environment?

sandbox

Other information

Tried as described in issue #128, but it did not help.

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