Skip to content

Commit 76e77aa

Browse files
committed
Fix truncation issue in Facet headers and options
1 parent 61f24dc commit 76e77aa

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/lib/components/Facets/Facets.svelte

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,14 @@
191191
hyphenOpacity="opacity-0"
192192
bind:checked={selectedGroups[group.name]}
193193
bind:group={selectedGroups}
194+
regionSymbol="shrink-0"
194195
>
195-
<p class="font-semibold whitespace-nowrap">
196-
{group.displayName}{group.count !== undefined ? ` (${group.count})` : ''}
197-
</p>
196+
<div class="grid grid-flow-col gap-2">
197+
<p class="font-semibold whitespace-nowrap truncate" title={group.displayName}>
198+
{group.displayName}
199+
</p>
200+
<span>{group.count !== undefined ? ` (${group.count})` : ''}</span>
201+
</div>
198202

199203
<svelte:fragment slot="children">
200204
<!-- If more than 5 choices, show the remaining in the Modal -->
@@ -210,9 +214,9 @@
210214
selection
211215
multiple
212216
>
213-
<div class="flex gap-2">
214-
<p class="w-max grow truncate">
215-
<span title={item.displayName}>{item.displayName}</span>
217+
<div class="grid grid-flow-col gap-2">
218+
<p class="truncate">
219+
<span class="" title={item.displayName}>{item.displayName}</span>
216220
</p>
217221
<span>({item.count})</span>
218222
</div>
@@ -237,9 +241,9 @@
237241
selection
238242
multiple
239243
>
240-
<div class="flex gap-2">
241-
<p class="w-max grow truncate">
242-
<span title={item.displayName}>{item.displayName}</span>
244+
<div class="grid grid-flow-col gap-2">
245+
<p class="truncate">
246+
<span class="" title={item.displayName}>{item.displayName}</span>
243247
</p>
244248
<span>({item.count})</span>
245249
</div>

0 commit comments

Comments
 (0)