Closed makeupyourmind closed 2 years ago
Thanks for reporting this, this is a bug indeed with resetting values using resetField
when the field is controlled by a form. It works with resetForm
tho.
In any case, I have fixed the issue and will be tagging a patch shortly.
Thanks again for the detailed report and the sample.
What happened?
I can not reset the
meta.dirty
flag usingresetField
method that provided byuseField
composition helper.The documentation says: the following regarding
resetField
method:So after resetting the field I expect that the
meta.dirty
flag will be equal tofalse
but it isn't. It has atrue
value. Why? Maybe I'm doing something wrong? How can I reset themeta.dirty
flag usinguseField
composition helper?My Vue template looks like:
My
package.json
looks like:I created a template in the sandbox for this. You can find it here.
Version
vue@3.2.33 and vee-validate@4.6.4