mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-07-04 02:53:40 +01:00
Merge branch 'master' of https://github.com/Azure/cosmos-explorer into fix_eslint_issues_2
This commit is contained in:
commit
ed79737603
@ -37,8 +37,8 @@ module.exports = {
|
|||||||
global: {
|
global: {
|
||||||
branches: 25,
|
branches: 25,
|
||||||
functions: 25,
|
functions: 25,
|
||||||
lines: 29.5,
|
lines: 29,
|
||||||
statements: 29.5,
|
statements: 29,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ describe("GalleryUtils", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("downloadItem shows dialog in data explorer", () => {
|
it("downloadItem shows dialog in data explorer", () => {
|
||||||
const container = {} as Explorer;
|
const container = new Explorer();
|
||||||
GalleryUtils.downloadItem(container, undefined, galleryItem, undefined);
|
GalleryUtils.downloadItem(container, undefined, galleryItem, undefined);
|
||||||
|
|
||||||
expect(useDialog.getState().visible).toBe(true);
|
expect(useDialog.getState().visible).toBe(true);
|
||||||
|
@ -69,7 +69,11 @@ export const useTabs: UseStore<TabsState> = create((set, get) => ({
|
|||||||
if (tab.tabId === activeTab.tabId && tabIndex !== -1) {
|
if (tab.tabId === activeTab.tabId && tabIndex !== -1) {
|
||||||
const tabToTheRight = updatedTabs[tabIndex];
|
const tabToTheRight = updatedTabs[tabIndex];
|
||||||
const lastOpenTab = updatedTabs[updatedTabs.length - 1];
|
const lastOpenTab = updatedTabs[updatedTabs.length - 1];
|
||||||
set({ activeTab: tabToTheRight || lastOpenTab });
|
const newActiveTab = tabToTheRight ?? lastOpenTab;
|
||||||
|
set({ activeTab: newActiveTab });
|
||||||
|
if (newActiveTab) {
|
||||||
|
newActiveTab.onActivate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set({ openedTabs: updatedTabs });
|
set({ openedTabs: updatedTabs });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user