react-final-form-arrays
react-final-form-arrays copied to clipboard
`dirtySinceLastSubmit` doesn't update when fields push/remove
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
meta.dirtySinceLastSubmit is not updated after fields.push or fields.remove call. Though not tested yet, I doubt the same problem exists in other fields methods.
What is the expected behavior?
(See sandbox link)
- click "Submit" button
- click "Add a habit" button
Expect the habits field array to have meta.dirtySinceLastSubmit === true
Sandbox Link
https://codesandbox.io/s/upbeat-pine-23rt4
What's your environment?
Other information
As a workaround, I add an invisible field, and call form.change to set that invisible field along with fields mutation calls to force dirtySinceLastSubmit update.
Same problem