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
It would be nice, if v-model works when using a prop as its target. By allowing this, we would reduce error prone boilerplate code, when having "pass-through" input/model components.
A similar request was made in #8403 , however there is acutally no need to introduce a new modifier or anything.
The v-model logic would be modified in the following way:
If the target of v-model is not a prop: Use the current behavior
Else, the target of v-model is a prop:
If the prop is the model of this component (by looking at the components options.model.prop), emit an event of the type declared in options.model.event with the new value
Else, emit an event of type update:PROP_NAME with the new value
Similar logic can be done for the .sync modifier targeting props.
What does the proposed API look like?
No API changes needed
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
It would be nice, if v-model works when using a prop as its target. By allowing this, we would reduce error prone boilerplate code, when having "pass-through" input/model components.
A similar request was made in #8403 , however there is acutally no need to introduce a new modifier or anything.
The v-model logic would be modified in the following way:
options.model.prop
), emit an event of the type declared inoptions.model.event
with the new valueupdate:PROP_NAME
with the new valueSimilar logic can be done for the
.sync
modifier targeting props.What does the proposed API look like?
No API changes needed
The text was updated successfully, but these errors were encountered: