-
Notifications
You must be signed in to change notification settings - Fork 254
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
[Question]: v-model not updating input value in Shadcn-vue Input component inside a Form #771
Comments
It seems to work if I bind the |
Don't create new Instead use https://stackblitz.com/edit/1d3tzs-8cmpb1?file=src%2FApp.vue |
Oooh ok cool ! So I can access to the values via
And it works! Thanks a lot ! Another questionHow can I pass the values to child component, it's like a Because in my context I have a stepper (with two steps) inside the form and each steps is a component. It's a form application with fields into the steps. |
In Stepper it's better to use https://www.shadcn-vue.com/docs/components/stepper.html#form So you could access the |
I am sorry but I can't understand how to do this... This is my
How can I use I want to modify / access (like I can't pass with this :
|
Can you share a minimal demo of your Stepper component I can't help in this way |
Reproduction
https://stackblitz.com/edit/1d3tzs-zd6u8m?file=src%2FApp.vue
Describe the bug
Description:
I am experiencing an issue with the
v-model
binding not updating the input value in theInput
component from Shadcn-vue inside aForm
. Even though the value changes in the parent component, the input field in the child component doesn't reflect the updated value.Steps to reproduce:
Input.vue
):Expected behavior:
The input field should update its value when
uniteLocale.ide
is modified programmatically.Actual behavior:
The value in the input field does not update even though the value of
uniteLocale.ide
changes.What I’ve tried:
passive: true
option fromuseVModel
.uniteLocale.ide
is being updated correctly by logging it and displaying it in a<span>
.watch
to observe changes tomodelValue
and emitupdate:modelValue
accordingly.Despite these changes, the input field does not reflect the updated value.
Additional context:
useVModel
from@vueuse/core
appears to work in other components, but here it doesn't update the input value as expected. Thespan
displayinguniteLocale.ide
is updated correctly, but not the input field.Thanks !
System Info
Contributes
The text was updated successfully, but these errors were encountered: