fix(PostgreSQL): issue with similar tabs on differend databases

This commit is contained in:
Fabio Di Stasio 2024-04-18 18:22:29 +02:00
parent 6600197b82
commit 23c59b4d4e
2 changed files with 9 additions and 1 deletions

View File

@ -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 });
};

View File

@ -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;