Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: auto expand database node in clicking event (#8129)

boojack5ca82d1a569a
diff --git a/frontend/src/components/SchemaEditor/DatabaseTree.vue b/frontend/src/components/SchemaEditor/DatabaseTree.vue
index 400cfbced6..0256c320f9 100644
--- a/frontend/src/components/SchemaEditor/DatabaseTree.vue
+++ b/frontend/src/components/SchemaEditor/DatabaseTree.vue
@@ -637,6 +637,12 @@ const nodeProps = ({ option: treeNode }: { option: TreeNode }) => {
}
} else if (treeNode.type === "database") {
await loadSubTree(treeNode);
+ const index = expandedKeysRef.value.findIndex(
+ (key) => key === treeNode.key
+ );
+ if (index < 0) {
+ expandedKeysRef.value.push(treeNode.key);
+ }
editorStore.addTab({
id: generateUniqueTabId(),
type: SchemaEditorTabType.TabForDatabase,