Subscribe on changes!

Binding `select` value with `:value` does not work with multiple

avatar
May 10th 2022

Version

3.2.33

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Open the Playground example

What is expected?

A and B to be marked in the bottom right select box

What is actually happening?

When more than one value is selected, no option will be marked as selected

avatar
May 10th 2022

when you choose not to use v-model, you need to handle the select element and it's option elements yourself.

in a plain multipleselect, you can't assign an array to value, that's not how selects work. you have to set the selectedattribute on each <option> that matches a value in the array.

v-modelhandles that for your.