Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value gets unset for fields that replace others while having the same name #3166

Closed
logaretm opened this issue Feb 9, 2021 · 0 comments
Closed
Labels
🐛 bug Unintended behavior

Comments

@logaretm
Copy link
Owner

logaretm commented Feb 9, 2021

Versions

  • vee-validate: 4.1.17
  • vue: 3.0.x

Describe the bug

If you have datatable-like components where you have rows of data that can be edited one at a time.

When I investigated it seems there is a race condition between unregisterField and registerField where the latter runs a little bit earlier causing the former to unset the field value.

To reproduce

Steps to reproduce the behavior:

  1. Go to the demo link
  2. Click on update button for a field late in the list
  3. Click on update button for the field before it
  4. Notice the field value is blank

Expected behavior

Fields should maintain their values,

Demo link

https://codesandbox.io/s/vee-validate-bug-reproduction-for-3166-hzcrg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant