I have disabled some of the items in vuetify's <v-autocomplete> using the prop item-disabled, naturally these items still appear in the dropdown. How can I, for this particular instance, hide those items as well?
Similar autocompletes appear through the application but not all should behave in similar way, for some instances the disabled items should be shown, for others not. Because of that I went ahead and added class for disabled items. This, however, doesnt seem to be applied and hidden item still appear in the list (probably due to the way vuetify implements dropdowns):
<v-autocomplete
v-model="selectedItem"
class="list-hide-disabled"
:items="items"
:item-disabled="isItemDisabled">
</v-autocomplete>
::v-deep .list-hide-disabled .v-list-item.v-list-item--disabled {
display: none;
}
isItemDisabled(item: ListItemModel): boolean {
return item.isDeleted;
}
filtering :items doesnt seem to be applicable because it will also hide prior selections, selected items chosen before disabling should still render. The v-slot:item also appears to be of no use because even if the content is hidden, it will keep empty box in place of the 'hidden' item.
