diff --git a/src/renderer/components/WorkspaceExploreBarSchema.vue b/src/renderer/components/WorkspaceExploreBarSchema.vue index 21fc6c6e..31cfbef0 100644 --- a/src/renderer/components/WorkspaceExploreBarSchema.vue +++ b/src/renderer/components/WorkspaceExploreBarSchema.vue @@ -513,7 +513,13 @@ const selectMisc = ({ schema, misc, type }: { schema: string; misc: { name: stri }; const openDataTab = ({ schema, table }: { schema: string; table: TableInfos }) => { - newTab({ uid: props.connection.uid, elementName: table.name, schema: props.database.name, type: 'data', elementType: table.type }); + newTab({ + uid: props.connection.uid, + elementName: table.name, + schema: props.database.name, + type: 'data', + elementType: table.type + }); setBreadcrumbs({ schema, [table.type]: table.name }); }; diff --git a/src/renderer/stores/workspaces.ts b/src/renderer/stores/workspaces.ts index 4c4fc417..63a0f25f 100644 --- a/src/renderer/stores/workspaces.ts +++ b/src/renderer/stores/workspaces.ts @@ -579,6 +579,7 @@ export const useWorkspacesStore = defineStore('workspaces', { tab.schema === schema && tab.elementName === elementName && tab.elementType === elementType && + tab.database === workspaceTabs.database && [type, type.replace('temp-', '')].includes(tab.type)) : false; @@ -629,6 +630,7 @@ export const useWorkspacesStore = defineStore('workspaces', { tab.schema === schema && tab.elementName === elementName && tab.elementType === elementType && + tab.database === workspaceTabs.database && [`temp-${type}`, type].includes(tab.type)) : false;