You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example app there are two instances of the same "Search input" component.
First component: Value is bound via v-model AND v-bind
Second component: value is only bound via v-model
What is expected?
When using v-model only, I expect the property to be reactive and data changes in the parent component should be reflected in the v-model-bound component.
In the example linked above, I expect the "default term" value from the search_term data variable to show up in the second component, which binds via v-model.
What is actually happening?
When using v-model only, data changes in the parent component are not reflected in the v-model-bound sub component. When using v-bind additionally, it is.
Unfortunately, your reproduction link isn't complete and is missing the referenced code.
When using v-model on a custom component it is important to define the model option.
Within the custom component you need to emit the change event so that the parent component knows the model has changed. Take a look at the customInput component I created: https://codesandbox.io/s/6xw3yv2wyn
Version
2.5.21
Reproduction link
https://codepen.io/thetetet/pen/QzjyEZ
Steps to reproduce
In the example app there are two instances of the same "Search input" component.
First component: Value is bound via
v-model
ANDv-bind
Second component: value is only bound via
v-model
What is expected?
When using
v-model
only, I expect the property to be reactive and data changes in the parent component should be reflected in the v-model-bound component.In the example linked above, I expect the "default term" value from the
search_term
data variable to show up in the second component, which binds viav-model
.What is actually happening?
When using
v-model
only, data changes in the parent component are not reflected in the v-model-bound sub component. When usingv-bind
additionally, it is.Seems to be related to: #8430
The text was updated successfully, but these errors were encountered: