File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/lib/components/Facets Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55 export let handleApply: (group : SelectedFacetGroup ) => {};
66 export let handleCancel: (groupName : string ) => {};
77
8- let selected = structuredClone (group .children );
8+ let selected = Object .keys (group .children )
9+ .sort ((a , b ) => group .children [a ].displayName .localeCompare (group .children [b ].displayName ))
10+ .map ((key ) => ({ [key ]: { ... group .children [key ] } }))
11+ .reduce ((acc , val ) => ({ ... acc , ... val }), {});
912
1013 const selectAll = () => {
1114 Object .keys (selected ).forEach ((key ) => (selected [key ].selected = true ));
3740 <h2 class ="text-xl font-semibold" >{group .displayName }</h2 >
3841
3942 <!-- Items -->
40- <div class =" gap-x-10 gap -y-3 py-10 px-2 max-h-[500px] columns-[192px] overflow-auto" >
43+ <div class =" gap-x-10 space -y-2 py-6 px-[2px] max-h-[500px] columns-[192px] overflow-auto min-h " >
4144 {#each Object .keys (selected ) as key }
4245 <label class =" flex gap-3 items-center w-48" >
4346 <input type ="checkbox" class ="checkbox" bind:checked ={selected [key ].selected } />
You can’t perform that action at this time.
0 commit comments