mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-22 00:42:47 +08:00
🐛 fix(sidebar): 修复表分组折叠后二次展开消失 Fixes #606
- 限制侧边栏折叠时的子树释放范围,只清理可重新懒加载的 connection/database 节点 - 保留 tables object-group 的已加载子节点,避免二次点击展开后表列表被清空 - 补充针对大表分组折叠场景的回归测试
This commit is contained in:
@@ -825,7 +825,7 @@ export const shouldClearSidebarNodeChildrenOnCollapse = (
|
||||
if (!node || node.isLeaf === true || !node.children?.length) {
|
||||
return false;
|
||||
}
|
||||
if (node.type !== 'connection' && node.type !== 'database' && node.type !== 'object-group') {
|
||||
if (node.type !== 'connection' && node.type !== 'database') {
|
||||
return false;
|
||||
}
|
||||
return collectSidebarSubtreeKeys(node).length >= SIDEBAR_COLLAPSE_UNLOAD_SUBTREE_LIMIT;
|
||||
|
||||
Reference in New Issue
Block a user