new UX - fixed support for singledb connections

This commit is contained in:
SPRINX0\prochazka
2024-11-26 12:29:16 +01:00
parent c823b8d19a
commit 27e70e8031
2 changed files with 45 additions and 22 deletions

View File

@@ -87,6 +87,7 @@
res.push({
connection: con,
conid: con._id,
database: con.singleDatabase ? con.defaultDatabase : null,
});
if ((expanded.includes(con._id) && opened.includes(con._id)) || filter) {
@@ -218,7 +219,11 @@
handleObjectClick={(data, options) => {
if (data.database) {
if (options.focusTab) {
switchCurrentDatabase({ connection: data.connection, name: data.database });
if ($openedSingleDatabaseConnections.includes(data.conid)) {
switchCurrentDatabase({ connection: data.connection, name: data.database });
} else {
switchCurrentDatabase({ connection: data.connection, name: data.database });
}
// console.log('FOCUSING DB', passProps);
// passProps?.onFocusSqlObjectList?.();
}