final-form / react-final-form-arrays

A component for rendering and editing arrays 🏁 React Final Form
MIT License
204 stars 69 forks source link

Having hidden FieldArrays in FieldArrays can mess up state if outer FieldArray item is deleted #120

Open vinczemarton opened 4 years ago

vinczemarton commented 4 years ago

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

https://codesandbox.io/s/react-final-form-nested-arrays-validation-32he5

  1. Expand the first company's customer section
  2. See that all customers are editable (typing in customer fields is possible, company name is editable)
  3. Delete the company that is currently expanded (red x next to company name)
  4. The customer fields are uneditable, the fields contain the deleted company's customers

What is the expected behavior?

All fields remain editable

Sandbox Link

https://codesandbox.io/s/react-final-form-nested-arrays-validation-32he5

What's your environment?

Latest chrome

Deepak7985 commented 2 years ago

@vinczemarton did you found any work around for the issue ?

vinczemarton commented 2 years ago

No, I backed out from using the library as it became very hard to debug performance.