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 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
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
You can’t perform that action at this time.
0 commit comments