File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/lib/components/Facets Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 28
28
handleCancel (group .name );
29
29
};
30
30
31
- const gridClass = (items : any []) => {
31
+ const maxHeightClass = (items : any []) => {
32
32
if (items .length >= 50 ) {
33
- return ' grid-cols-5 ' ;
33
+ return ' max-h-[500px] ' ;
34
34
} else if (items .length >= 30 ) {
35
- return ' grid-cols-4 ' ;
35
+ return ' max-h-[400px] ' ;
36
36
} else if (items .length >= 20 ) {
37
- return ' grid-cols-3 ' ;
37
+ return ' max-h-[300px] ' ;
38
38
}
39
39
40
- return ' grid-cols-2 ' ;
40
+ return ' max-h-[200px] ' ;
41
41
};
42
42
</script >
43
43
47
47
48
48
<!-- Items -->
49
49
<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 (
51
51
Object .keys (selected )
52
- )} !gap-x-20 gap-y-2 py-10 px-2 max-h-[1000px] overflow-x-auto max-w-6xl "
52
+ )}"
53
53
>
54
54
{#each Object .keys (selected ) as key }
55
- <label class =" flex gap-3 items-center" >
55
+ <label class =" flex gap-3 items-center w-52 " >
56
56
<input type ="checkbox" class ="checkbox" bind:checked ={selected [key ].selected } />
57
57
<span class =" whitespace-nowrap break-before-avoid break-after-avoid"
58
58
>{selected [key ].displayName }</span
You can’t perform that action at this time.
0 commit comments