Skip to content

UseFieldArray remove() should set form dirty? #3782

Description

@MartinAmsinck

What happened?

When i remove an element from a fieldArray, both values and inititalValues is updated, resulting in a form that is not Dirty?

Looks like this is by design,, or i'm i missing something?

I would expect a form that, gets a field removed would become dirty?

Reproduction steps

  1. Use the basic example from here: https://vee-validate.logaretm.com/v4/api/use-field-array
  2. Set initialValues to { links: [{ id: 1, url: 'https://github.com/logaretm' }, { id: 2, url: 'https://github2.com/logaretm' }], }
  3. Remove on of the fields

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

No response

Demo link

https://vee-validate.logaretm.com/v4/api/use-field-array

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugUnintended behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions