final-form / final-form/react-final-form-arrays
When using "push" and then "remove" the form stays dirty.
- Dominant language
- TypeScript
- Stars
- 210
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
### Are you submitting a **bug report** or a **feature request**?
I believe this is a bug, but it is possible that I am not understanding something.
### What is the current behavior?
When using a `FieldArray`, `push`, and `remove` you can end up with a dirty form, when I don't think it should be dirty.
I forked the Simple Demo: https://codesandbox.io/s/32p402x3om
* Click `Add Customer`
* Click the `X` to remove the just added field.
The form stays dirty, but I would expect it to be back to pristine.
### What is the expected behavior?
* I think the form should not be dirty, since you have undone the adding of a field (similar to typing in a text input, and then deleting the text)
### Sandbox Link
https://codesandbox.io/s/32p402x3om
### What's your environment?
React Final form. Mac OSX Chrome.
### Other information
Thank you for a great library. Let me know if I can provide more information.
Contributor guide
Assessment
This issue has not been assessed yet.