Skip to content

Commit

Permalink
feat(SegmentGroupControls): ellipsis + tooltip for long seg names
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed Oct 21, 2024
1 parent 155f694 commit 93e349a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/EditableChipList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const props = withDefaults(
const itemsToRender = computed(() =>
props.items.map((item) => ({
key: item[props.itemKey] as string | number | symbol,
title: item[props.itemTitle],
title: item[props.itemTitle] as string | undefined,
}))
);
</script>
Expand All @@ -47,7 +47,11 @@ const itemsToRender = computed(() =>
@click="toggle"
>
<slot name="item-prepend" :key="key" :item="items[idx]"></slot>
<span class="overflow-hidden">{{ title }}</span>
<v-tooltip :text="title" location="end">
<template #activator="{ props }">
<span v-bind="props" class="text-truncate">{{ title }}</span>
</template>
</v-tooltip>
<v-spacer />
<slot name="item-append" :key="key" :item="items[idx]"></slot>
</v-chip>
Expand Down

0 comments on commit 93e349a

Please sign in to comment.