sql object sort WIP

This commit is contained in:
SPRINX0\prochazka
2025-11-21 16:37:12 +01:00
parent 7ec156a5d1
commit ae9676f744
2 changed files with 82 additions and 17 deletions

View File

@@ -87,12 +87,24 @@
return;
}
if (item.switchStore && item.switchValue) {
item.switchStore.update(x => ({
...x,
[item.switchValue]: !x[item.switchValue],
}));
item.switchStore.update(x => {
const res = {
...x,
[item.switchValue]: !x[item.switchValue],
};
if (item.switchGroupPrefix) {
for (const key of Object.keys(res)) {
if (key.startsWith(item.switchGroupPrefix) && key !== item.switchValue) {
res[key] = false;
}
}
}
return res;
});
switchIndex++;
return;
if (!item.closeOnSwitchClick) {
return;
}
}
dispatchClose();
if (onCloseParent) onCloseParent();