Skip to content

Commit 89a5503

Browse files
committed
#101 Change order from row-wise to column-wise
1 parent 55d18d0 commit 89a5503

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/lib/components/Facets/ShowMore.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
handleCancel(group.name);
2929
};
3030
31-
const gridClass = (items: any[]) => {
31+
const maxHeightClass = (items: any[]) => {
3232
if (items.length >= 50) {
33-
return 'grid-cols-5';
33+
return 'max-h-[500px]';
3434
} else if (items.length >= 30) {
35-
return 'grid-cols-4';
35+
return 'max-h-[400px]';
3636
} else if (items.length >= 20) {
37-
return 'grid-cols-3';
37+
return 'max-h-[300px]';
3838
}
3939
40-
return 'grid-cols-2';
40+
return 'max-h-[200px]';
4141
};
4242
</script>
4343

@@ -47,12 +47,12 @@
4747

4848
<!-- Items -->
4949
<div
50-
class="grid {gridClass(
50+
class="flex flex-wrap flex-col overflow-x-auto !gap-x-20 gap-y-2 py-10 px-2 max-w-6xl h-min {maxHeightClass(
5151
Object.keys(selected)
52-
)} !gap-x-20 gap-y-2 py-10 px-2 max-h-[1000px] overflow-x-auto max-w-6xl"
52+
)}"
5353
>
5454
{#each Object.keys(selected) as key}
55-
<label class="flex gap-3 items-center">
55+
<label class="flex gap-3 items-center w-52">
5656
<input type="checkbox" class="checkbox" bind:checked={selected[key].selected} />
5757
<span class="whitespace-nowrap break-before-avoid break-after-avoid"
5858
>{selected[key].displayName}</span

0 commit comments

Comments
 (0)