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 not dirty after removing items from FieldArray using final-form-arrays #1038

Open
outofthisworld opened this issue Oct 23, 2023 · 0 comments

Comments

@outofthisworld
Copy link

outofthisworld commented Oct 23, 2023

Are you submitting a bug report or a feature request?

Bug Report

What is the current behavior?

I'm using react-final-form with final-form-arrays. I have a field array with a list of items, three items in the array. When I delete 2 out of 3 of the items, debug shows that the form is dirty and identifies the deleted items. Deleting the last item from the array shows the value of the array being empty ([]) however dirty being false, dirtySinceLastSubmit being false andpristine as true.

Am I missing something or should dirty remain true even if all items are deleted

What is the expected behavior?

Form remains dirty when length of array differs from initial values?

What's your environment?

"final-form": "^4.20.6",
"final-form-arrays": "^3.0.2"
"react-final-form": "^6.5.7"
"react-final-form-arrays": "^3.1.3"

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