I'm dynamically creating vue-select dropdown lists that allow multiple selection. But these dropdown lists are allowing the same option being chosen. How can I change this behaviour without using v-model (since I'm creating these lists dynamically)?
Options:
"categories": [
{
"id": 1,
"name": "Math",
"years": [
{ "id": 14, "name": "4" },
{ "id": 15, "name": "5" },
{ "id": 16, "name": "6" }
]
},
{
"id": 2,
"name": "Science",
"years": [
{ "id": 11, "name": "1" },
{ "id": 12, "name": "2" },
{ "id": 13, "name": "3" }
]
}
]
HTML:
<div
v-for="category in categories">
<label>{{category.name}}</label>
<vue-select
:options="category.years"
label="name"
@input="onCategoryYearSelect"
multiple>
</vue-select>
</div>