You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at where the FieldArray is registered, I see there is no equality comparator passed which would mean it defaults to a === check which would fail for an array.
I'm really wondering if this is related to final-form/react-final-form#709 wherein the underlying useField hook is no longer providing updated meta for sub-fields. The issue is regarding meta.active, but it's actually all meta data.
Are you submitting a bug report or a feature request?
Bug
What is the current behavior?
If I change any field in a FieldArray, the state of the parent FieldArray changes to dirty and stays dirty even after reverting to the original state.
What is the expected behavior?
The top level FieldArray should revert to pristine state if the fields are returned to their original state.
Sandbox Link
I'd be happy to provide one if needed.
What's your environment?
Other information
https://github.com./final-form/react-final-form-arrays/blob/master/src/FieldArray.js#L78
Looking at where the FieldArray is registered, I see there is no equality comparator passed which would mean it defaults to a
===
check which would fail for an array.I added a small snippet to enable addition of custom field level comparator to compare the arrays in my fork here: https://github.com./anant-singh/react-final-form-arrays/blob/dirty-field-check/src/FieldArray.js#L69-L88
The text was updated successfully, but these errors were encountered: