Skip to content

Commit

Permalink
feat(experimental/Select!): add new empty slot
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Aug 2, 2023
1 parent 92d540e commit e0c2846
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions packages/select/src/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ defineSlots<{
itemText?: string;
selectionItemProps?: InstanceType<typeof VBadge>['$props'];
}) => any;
empty?: (props: {items: T[]; emptyText?: string}) => any;
}>();
</script>

Expand Down Expand Up @@ -371,9 +372,17 @@ defineSlots<{
/>
<VDivider />
</div>
<div v-if="filteredItems?.length < 1" class="v-select-empty">
{{ emptyText }}
</div>
<slot
name="empty"
v-bind="{
items: filteredItems,
emptyText,
}"
>
<div v-if="filteredItems?.length < 1" class="v-select-empty">
{{ emptyText }}
</div>
</slot>
<div
:class="{
'v-select-scrollable':
Expand Down

0 comments on commit e0c2846

Please sign in to comment.