final-form / react-final-form-arrays

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

conditionnaly displayed FieldArray not reflect form values (seems de sync) #109

Open lionelB opened 5 years ago

lionelB commented 5 years ago

Are you submitting a bug report or a feature request?

a bug report

What is the current behavior?

I use a pattern that rely on a Field to conditionnaly show / hide a FieldArray It appear that the field array wrapped inside a condition are not in synch with the form values

You can check a different flavour of the bug by removing the initialValues in my exemple

What is the expected behavior?

The field Array should reflect the form values

Sandbox Link

https://codesandbox.io/s/react-final-form-field-arrays-nbh7d

What's your environment?

the problem appears after I bump react-final-form from 4.1.2 to 6.3.0

hope it helps !

MakaryHryshkin commented 3 years ago

Having the same issue, it took some time to figure out it was the conditional render in my react code. Curious if there are any updates on this issue.