-
-
Notifications
You must be signed in to change notification settings - Fork 8.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
Attribute inheritance does not support v-model #2667
Comments
See #1989 You still need to pass the correct attributes and event listeners based on your inner component that receives the v-model. In your case, add a prop Otherwise, this would mean applying a magic conversion for a prop named |
Thanks for the workaround. You've phrased it differently but essentially you are saying "indeed, wrapping inputs with attribute inheritance does not support v-model, unless you explicitly add support for it to the wrapping component (see example)", is that correct? Would it be helpful if I open a PR to add this to the documentation? It's a pretty nasty gotcha. |
If you find a way to naturally introduce it (not a note/tip that breaks the flow), at https://v3.vuejs.org/guide/component-basics.html#using-v-model-on-components or somewhere else, I'm sure the docs team will appreciate! The idea is said there, though, v-model becomes an attribute an event listener, it's a convention. |
Version
3.0.2
Reproduction link
https://jsfiddle.net/kr16gc2s/1/
Steps to reproduce
Try and adjust the slider; you won't see the text update.
What is expected?
The text should update upon adjusting the slider.
What is actually happening?
It doesn't update.
The text was updated successfully, but these errors were encountered: