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
have a three component deep hierarchy, e.g.: App - Middle - Inner as per the repro
in App, declare a ref to hold the value
pass it to Middle via v-model
in Middle,
only use defineModel, but don't store it in a local const
pass it to Inner via v-model
What is expected?
I would expect one of the following
it should work (same way when I use a prop/model only in the template then I don't have to store it in a local const)
an error message telling me I should probably store the Middle's model in a local const
A misleading (though technically probably correct) error message
(2:28) v-model cannot be used on a prop, because local prop bindings are not writable. Use a v-bind binding combined with a v-on listener that emits update:x event instead.
System Info
Any additional comments?
the repro is the stripped down to the core prod code we used that triggered the issue
in the repro, in MiddleComponent.vue it has the working version too, just commented out
The text was updated successfully, but these errors were encountered:
zsoldosp
changed the title
misleading error message when nesting v-models
misleading error message when nesting/passing on v-models
May 5, 2025
zsoldosp
changed the title
misleading error message when nesting/passing on v-models
misleading error message when nesting/passing on v-model
May 5, 2025
Vue version
3.5.13
Link to minimal reproduction
https://play.vuejs.org/#eNqtU8tOwzAQ/JXFl4AEzQFOVXmLA0g8BBx9Sd1NMXXsyHZKpSj/ztqhbdoUBBK3eHd2PDue1OyyLAfzCtmQjTwWpco8nnENMLqXk4nCa1OURqP2MD8qzATV0FXjQnov9fSUs/WBM0hpcJR2WOjohJWlB4e+KkFlccg7zuIdkrithxos5tBAbk0BCYlJOs1tGS1okG7Vww5xDEAY7ejGlTI4DfyjsTEKM322n2fK4UGQ2oojKeyQRNFcLqeDd2c0uVEHMs4EXSAV2sfSS+LlbAixE3qZUubjLta8rfBwWRdvKGY76u9uEWqcPVl0aOfI2arnMztF37ZvXh5wQd+rJhlfKUL/0HxGZ1QVNLawq0qTPbaDi2pvo6lkyqu7WXjUbrlUEBqQTcRzRnYGb79bfS33eHAS57huyMUdr9JP1q3WaHvB+q80bbEv87JZXsUlTeHD2Fm4Mp52hGeCudR4HzSuQ5SsIQllKRLlmVRfRL+Z2cxfX1/fuHHlvdFwIZQUsw2/SOZe172IB6jr7irnkIhMC1QJDOFLTAINPR1xpy35X03/rV+9n441nwK9jA4=
Steps to reproduce
have a three component deep hierarchy, e.g.:
App
-Middle
-Inner
as per the reproin
App
, declare aref
to hold the valuepass it to
Middle
viav-model
in
Middle
,defineModel
, but don't store it in a localconst
Inner
viav-model
What is expected?
I would expect one of the following
Middle
's model in a local constWhat is actually happening?
A misleading (though technically probably correct) error message
System Info
Any additional comments?
the repro is the stripped down to the core prod code we used that triggered the issue
in the repro, in MiddleComponent.vue it has the working version too, just commented out
p.s.: https://new-issue.vuejs.org/?repo=vuejs/core doesn't prefill the github anymore
The text was updated successfully, but these errors were encountered: