mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
Mongo tabs UX fixes (#851)
* Fixed mongo tabs UX * changed logic for new tab index * moved index to tabs base * removed getIndex method
This commit is contained in:
committed by
GitHub
parent
f296c00a1c
commit
ee60f61cfe
@@ -1394,7 +1394,11 @@ export default class Explorer {
|
||||
tab.hashLocation().startsWith(hashLocation)
|
||||
) as TerminalTab[];
|
||||
|
||||
const index = terminalTabs.length + 1;
|
||||
let index = 1;
|
||||
if (terminalTabs.length > 0) {
|
||||
index = terminalTabs[terminalTabs.length - 1].index + 1;
|
||||
}
|
||||
|
||||
const newTab = new TerminalTab({
|
||||
account: userContext.databaseAccount,
|
||||
tabKind: ViewModels.CollectionTabKind.Terminal,
|
||||
@@ -1407,6 +1411,7 @@ export default class Explorer {
|
||||
onLoadStartKey: null,
|
||||
container: this,
|
||||
kind: kind,
|
||||
index: index,
|
||||
});
|
||||
|
||||
this.tabsManager.activateNewTab(newTab);
|
||||
|
||||
Reference in New Issue
Block a user