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
resetForm does not completely reset array when used with useFieldArray #3934
Comments
Here is another example with strings instead of objects: https://stackblitz.com/edit/vitejs-vite-fprg25?file=src/App.vue.
Expected values state: {
"links": [
"first string",
]
} Actual values state: {
"links": [
"first string",
null
]
} |
Thanks for reporting this. Found the issue and will tag a release shortly. |
resetform celar all to be null... reset should be return to initial model value... hope could be fixed as soon |
@CraxTrader Should be out in 4.6.9 already |
is issue fixed ? i still get the error. Can't reset to empty array |
What happened?
When resetting a form via
resetForm
, objects that were added to an array via useFieldArraypush
are not completely removed. They are removed ifresetForm
is run twice.Reproduction steps
Add
button twice.resetForm
button once.Expected values state:
Actual values state:
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/vitejs-vite-qwtv7u?file=src/App.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: