-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[v4] Two of the same input component #3429
Comments
Do you mind creating a demo for this? you can use codesandbox |
@logaretm Added a codesandbox link |
Thank you for reporting this, The issue was that the field was always configured to use its configured initial value when mounted. While I doubt that you should be using 2 fields of exactly the same name and model at the same time, at least the current value should be priotrized. The fix will be out in the next patch release for both |
Update: This might get reverted in 4.5 because it conflicts with other improvements and a previous fix in #3166 . Can you tell me more about your use case with duplicate fields with the same name in the same form? |
We were building a package that showcases some examples with the same fields with different states. such as,
PS: I've written the reply to this 3 times without pressing the comment button. |
Right, it is possible but you shouldn't include those fields in the same form. You could use |
What happened?
I have a dynamic form which is built on demand with an API Response.
Wrapper.vue
InputText.vue
Things are working normally until I introduce the same
props.element.handle
more than once.basically, everything is InputText.vue components. that are hidden but activated when it goes to a new tab (https://quasar.dev/vue-components/tabs#introduction)
When the hidden tab is activated, it resets all the components to the initial value which was passed to the visible element.
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Demo link
https://codesandbox.io/s/form-inputs-m8ldz?file=/src/App.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: