fix(sidebar): load visible schema filters on mount
This commit is contained in:
1 parent
1e7a33bd99
commit
86a6846b10
7 files changed
+47
-12
No files matched your search
@@ -40,6 +40,12 @@ export function usesTreeSchemaMode(dbType?: DatabaseType): boolean {
|
||||
return !!dbType && TREE_SCHEMA_TYPES.has(dbType);
|
||||
}
|
||||
|
||||
export function canConfigureVisibleSchemasForTreeNode(dbType: DatabaseType | undefined, nodeType: TreeNodeType, database?: string | null): boolean {
|
||||
if (!isSchemaAware(dbType)) return false;
|
||||
if (nodeType === "database") return database != null;
|
||||
return nodeType === "connection" && !usesTreeSchemaMode(dbType);
|
||||
}
|
||||
|
||||
export function usesDatabaseObjectTreeMode(dbType?: DatabaseType): boolean {
|
||||
return !!dbType && DATABASE_OBJECT_TREE_TYPES.has(dbType);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user