Please provide an example of how to use initialValues in [email protected] since they are not reactive now #4576
-
I saw the last release notes for 4.12 version and it's mentioned there, that it's recommended to use I also don't see new API in vee-validate docs, are they updated? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
logaretm
Dec 1, 2023
Replies: 1 comment
-
You need to call const { values, resetForm } = useForm();
watch(() => props.initialData, (newData) => {
if (isEqual(newData, values)) {
return;
}
resetForm({ values: newData });
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
osipMax
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to call
resetForm
whenever you need the initial values to be set. Assuming you have aMyForm
component and your initial values are async then you can setup a watcher.