I am experimenting with widgets in D2 ui-template. I have a v-select and the docs suggests that @update:modelValue should be fired when the selected value changes, but I can't get this to work. @click does work. This is what I have so far. The code that changes the selection when an option is passed in msg.payload does work. Can anyone see what I am doing wrong?
[Clarification Edit] When I said that I can update the selection by passing in a message, that does change the selection but does not trigger the event.
Both work for me, possibly for compatibility with an older version of vue. Changing that does not make the update trigger work. The docs I linked to show model-value.
I also tried @change.
I noticed also that @update:modelValue didnt work,
when i was testing recently for another post that used v-select
After some research on the internet, what worked for me is to use @update:model-value="mvchanged" instead.
Did you manage to access the new value? I can't work out how to do that. If, in the mvchanged function I put this.send({payload: "model-value changed " + this["model-value"]})
then it just sends the value as undefined.
mvchanged only fires when a selection is clicked on in the dropdown. With the code above the @update:model-value="mvchanged" (and therefor the mvchanged function) is not required. The send works both ways (selection & msg in)