v-model
not updating from external changes? Is this a bug?
#7120
-
I've been struggling with this for a while now, and I can't quite figure out what I'm doing wrong. Is this a bug? I've created a component called I have a reproduction here: What should happen in the repro is the values displayed under "Real values" should always match the "Editable values". The problem is when the values are edited externally (by clicking "Reset"), the editable values don't update like they should. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ok. so for anyone who finds this in the future: The problem was I was returning modelValue at the end of my From my repro linked above, before: return {
modelValue,
editor,
display,
editing,
...
}; After: return {
editor,
display,
editing,
...
}; |
Beta Was this translation helpful? Give feedback.
Ok. so for anyone who finds this in the future:
The problem was I was returning modelValue at the end of my
ClickToEdit
'ssetup()
. It's not necessary to export props like this because they are automatically made accessible in the<template>
. I'm still not quite sure why that was a problem though.From my repro linked above, before:
After: