-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
v-model not working with input type hidden #372
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
Comments
In the handler you need to change the model: |
Yes. I made that on purpose, because I have an external library that changes hidden inputs values and I need that changes reflected to vue data model. |
At such case (interaction between different worlds) I would use events sending (pub/sub). I guess it is conceptually correct: different worlds can not share data but can send messages to each other. But, I see, probably, that external library isn't events aware. |
Vue does not detect the changes when directly setting |
Yes I solved this problem doing just that. |
For others searching for this, the following jQuery code can be used to force Vue to update it's data once the value of the hidden field is changed (generally from some other external plugin or library)...
|
Please see #6135 |
Don't know if I missed something but v-model doesn't seem to update it's value when value of hidden input changes.
Example: http://jsfiddle.net/zvjE6/
The text was updated successfully, but these errors were encountered: