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

reactive initial value in useField has no effect on resetField #4827

Open
2 of 5 tasks
MRezaKarimi opened this issue Jul 27, 2024 · 0 comments
Open
2 of 5 tasks

reactive initial value in useField has no effect on resetField #4827

MRezaKarimi opened this issue Jul 27, 2024 · 0 comments

Comments

@MRezaKarimi
Copy link

What happened?

When I pass a ref object as initial value in useField, changing the value of that object seems to have no effect on resetField.

Reproduction steps

  1. open minimal reproduction
  2. at first, the value of field is "before change".
  3. click on change initial value button.
  4. now initialValue becomes "after change".
  5. click on change field's value to change field's value to a random string.
  6. click on reset value button.
  7. now field's value should be "after change" according to new initialValue but it resets to the old value (i.e. before change)!

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://codesandbox.io/p/sandbox/new-tree-fkn9ls?file=%2Fsrc%2FApp.vue%3A7%2C40

Code of Conduct

@MRezaKarimi MRezaKarimi changed the title reactive initial value in useField not working reactive initial value in useField has no effect on resetField Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant