-
What happened?How can i watch field values using Vee Validate v4 and Element Plus together with Yup schemas. and how can I assign value to another form field dynamically without refreshing everything cause if i use initialValues it seems like it re renderes everything and loose what you have typed back to initialValues.
Reproduction stepsCopied example form the document and tried to watch form fields and it does nothing, i dont have access to the form fields tried to watch initialValues object nothing happens also VersionVue.js 3.x and vee-validate 4.x What browsers are you seeing the problem on?
Relevant log outputNo response Demo linkhttps://codesandbox.io/s/vee-validate-v4-with-element-plus-framework-forked-x869c?file=/src/App.vue Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Please keep your questions either in the discussions section or ask on StackOverflow, the issues section is dedicated to actual issues bug reports and suggestions. To answer your question, if you need to watch the current value you are better off using the composition API here and watch the For setting values you can either assign the Here is an example: https://codesandbox.io/s/vee-validate-v4-with-element-plus-framework-forked-k75l5?file=/src/App.vue |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. |
Beta Was this translation helpful? Give feedback.
Please keep your questions either in the discussions section or ask on StackOverflow, the issues section is dedicated to actual issues bug reports and suggestions.
To answer your question, if you need to watch the current value you are better off using the composition API here and watch the
value
property off theuseField
function.For setting values you can either assign the
value
property directly to whatever value you need or use thesetFieldValue
function.Here is an example:
https://codesandbox.io/s/vee-validate-v4-with-element-plus-framework-forked-k75l5?file=/src/App.vue