Skip to content

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

chore: expand/collapse nodes (#4473)

Liu Jif6563d8733ff
diff --git a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
index 78a14f5fcb..ea08ecc617 100644
--- a/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
+++ b/frontend/src/views/sql-editor/AsidePanel/DatabaseTree.vue
@@ -19,6 +19,7 @@
block-line
:data="treeData"
:pattern="searchPattern"
+ :expand-on-click="true"
:selected-keys="selectedKeys"
:expanded-keys="connectionTreeStore.expandedTreeNodeKeys"
:render-label="renderLabel"
@@ -273,9 +274,7 @@ const nodeProps = ({ option }: { option: TreeOption }) => {
if (isDescendantOf(e.target as Element, ".n-tree-node-content")) {
// Check if clicked on the content part.
// And ignore the fold/unfold arrow.
- if (atom.type === "project") {
- maybeExpandKey(`project-${atom.id}`);
- } else {
+ if (atom.type === "instance" || atom.type === "database") {
setConnection(atom);
}
}