Skip to content

Form not dirty after removing items from FieldArray using final-form-arrays #1038

Open
@outofthisworld

Description

@outofthisworld

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions