final-form / final-form/react-final-form
Form not dirty after removing items from FieldArray using final-form-arrays
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### 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 and`pristine` 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"
Contributor guide
Assessment
This issue has not been assessed yet.