You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was worked around with an autocomplete function. When I use setFieldValue() to set an array of data into values, FieldArray does not respond to the new value. However, I do find a temporary solution which is using setValues(JSON.parse(JSON.stringify(values))); after all of the data replacement. The FieldArray will respond.
Object.entries(donator).forEach(([k, v]) => {
setFieldValue(k, v instanceof Array ? Object.values(v) : v);
});
// Trigger FieldArray to responde to the new values
setValues(JSON.parse(JSON.stringify(values)));
What happened?
Hi,
I was worked around with an autocomplete function. When I use
setFieldValue()
to set an array of data intovalues
,FieldArray
does not respond to the new value. However, I do find a temporary solution which is usingsetValues(JSON.parse(JSON.stringify(values)));
after all of the data replacement. TheFieldArray
will respond.Reproduction steps
No response
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
None
Code of Conduct
The text was updated successfully, but these errors were encountered: