godbasin / vue-select2

select2 component in vue.
MIT License
123 stars 62 forks source link

selected: true is not working #28

Closed stephendeo closed 4 years ago

stephendeo commented 4 years ago

In the options i'm setting the property 'selected: true'

someData: [ { id: 1, text: 'opt1'}, { id: 2, text: 'opt2', disabled: true }, { id: 3, text: 'opt3', selected: true } ]

Its not setting the selected attribute for that option

godbasin commented 4 years ago

You should use v-model to bind options selected.

stephendeo commented 4 years ago

You should use v-model to bind options selected.

Sorry didn't reply before, but yes using v-model to bind the options worked perfectly. Thank you.