mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
tab drag&drop fix
This commit is contained in:
parent
f5d41c89e6
commit
ff044ebec8
@ -50,6 +50,6 @@
|
|||||||
tabComponent={mountedTabs[tabid]}
|
tabComponent={mountedTabs[tabid]}
|
||||||
{...openedTabsByTabId[tabid]?.props}
|
{...openedTabsByTabId[tabid]?.props}
|
||||||
{tabid}
|
{tabid}
|
||||||
tabVisible={tabid == (shownTab && shownTab.tabid)}
|
tabVisible={tabid == shownTab?.tabid}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -8,7 +8,13 @@
|
|||||||
export let multiTabIndex;
|
export let multiTabIndex;
|
||||||
|
|
||||||
function findShownTab(tabs: TabDefinition[], multiTabIndex, lockedDbMode, currentDb) {
|
function findShownTab(tabs: TabDefinition[], multiTabIndex, lockedDbMode, currentDb) {
|
||||||
const selectedTab = tabs.find(x => x.selected && x.closedTime == null && (x.multiTabIndex || 0) == multiTabIndex);
|
const selectedTab = tabs.find(
|
||||||
|
x =>
|
||||||
|
x.selected &&
|
||||||
|
x.closedTime == null &&
|
||||||
|
(x.multiTabIndex || 0) == multiTabIndex &&
|
||||||
|
shouldShowTab(x, lockedDbMode, currentDb)
|
||||||
|
);
|
||||||
if (selectedTab) {
|
if (selectedTab) {
|
||||||
return selectedTab;
|
return selectedTab;
|
||||||
}
|
}
|
||||||
|
@ -447,6 +447,11 @@
|
|||||||
return x;
|
return x;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
draggingDbGroup.set(null);
|
||||||
|
draggingDbGroupTarget.set(null);
|
||||||
|
draggingTab.set(null);
|
||||||
|
draggingTabTarget.set(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
let domTabs;
|
let domTabs;
|
||||||
|
Loading…
Reference in New Issue
Block a user