0
Instead of using v-model
, use value
and @change
:value="form.docTypeIds"
And a @change
hander:
@select="handleMultiSelection"
Then add the method that reduces
the values into an array of ids
:
handleMultiSelection (values) {
this.form.docTypeIds = values.reduce((carry, obj) => {
return obj.k
}, [])
}
Source:stackexchange.com