Skip to content

Commit 32833da

Browse files
committed
#100 Truncate Facet options for facets with fewer options
1 parent 547c4fc commit 32833da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/components/Facets/Facets.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
bind:checked={selectedGroups[group.name]}
187187
bind:group={selectedGroups}
188188
>
189-
<p class="font-semibold">
189+
<p class="font-semibold whitespace-nowrap">
190190
{group.displayName}{group.count !== undefined ? ` (${group.count})` : ''}
191191
</p>
192192

@@ -231,7 +231,12 @@
231231
selection
232232
multiple
233233
>
234-
<p>{item.displayName} ({item.count})</p>
234+
<div class="flex gap-2">
235+
<p class="w-max grow truncate">
236+
<span title={item.displayName}>{item.displayName}</span>
237+
</p>
238+
<span>({item.count})</span>
239+
</div>
235240
</TreeViewItem>
236241
{/each}
237242
{/if}

0 commit comments

Comments
 (0)