How to disable options in v-autoplete? I did see this item-disabled
and passed the string value of the option it didn't work.
code snippet
<v-autoplete
:items="states"
item-text="name"
label="State"
item-disabled="Florida"
></v-autoplete>
How to disable options in v-autoplete? I did see this item-disabled
and passed the string value of the option it didn't work.
code snippet
<v-autoplete
:items="states"
item-text="name"
label="State"
item-disabled="Florida"
></v-autoplete>
Share
Improve this question
asked Oct 12, 2018 at 4:51
SamSam
2,4259 gold badges35 silver badges53 bronze badges
1 Answer
Reset to default 6<v-autoplete
:items="states"
item-text="name"
label="State"
></v-autoplete>
Simply add a disabled prop to your Object:
states: [
{
name: "New York", disabled: true
},
{
name: "Florida"
},
{
name: "Texas"
},
]
You could populate that property dynamicly depending on what you want to be disabled.
https://codepen.io/anon/pen/yRXrJL?editors=1111