mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 06:06:01 +00:00
sort tables by size/rowCount
This commit is contained in:
@@ -86,26 +86,26 @@
|
||||
submenuKey += 1;
|
||||
return;
|
||||
}
|
||||
if (item.switchStore && item.switchValue) {
|
||||
item.switchStore.update(x => {
|
||||
const res = {
|
||||
if (item.switchStore) {
|
||||
if (item.switchValue) {
|
||||
item.switchStore.update(x => ({
|
||||
...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;
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
if (item.switchOption && item.switchOptionValue) {
|
||||
item.switchStore.update(x => ({
|
||||
...x,
|
||||
[item.switchOption]: item.switchOptionValue,
|
||||
}));
|
||||
}
|
||||
switchIndex++;
|
||||
if (!item.closeOnSwitchClick) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dispatchClose();
|
||||
if (onCloseParent) onCloseParent();
|
||||
if (item.onClick) item.onClick();
|
||||
@@ -175,6 +175,16 @@
|
||||
{/if}
|
||||
{/key}
|
||||
{/if}
|
||||
{#if item.switchOption && item.switchStoreGetter}
|
||||
{@const optionValue = item.switchStoreGetter()[item.switchOption]}
|
||||
{#key switchIndex}
|
||||
{#if optionValue === item.switchOptionValue || (item.switchOptionIsDefault && !optionValue)}
|
||||
<FontIcon icon="icon check" padRight />
|
||||
{:else}
|
||||
<FontIcon icon="icon invisible-box" padRight />
|
||||
{/if}
|
||||
{/key}
|
||||
{/if}
|
||||
{item.text || item.label}
|
||||
</span>
|
||||
{#if item.keyText}
|
||||
|
||||
Reference in New Issue
Block a user