mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 16:21:39 +00:00
fix(sidebar): refresh grouped object nodes
This commit is contained in:
@@ -58,6 +58,20 @@ const groupDefs: Array<{
|
||||
},
|
||||
];
|
||||
|
||||
const objectGroupNodeTypes = new Set<TreeNodeType>([
|
||||
"group-tables",
|
||||
"group-views",
|
||||
"group-procedures",
|
||||
"group-functions",
|
||||
]);
|
||||
|
||||
export function objectGroupRefreshParentId(node: TreeNode): string | null {
|
||||
if (!objectGroupNodeTypes.has(node.type)) return null;
|
||||
const suffixStart = node.id.lastIndexOf(":__");
|
||||
if (suffixStart < 0) return null;
|
||||
return node.id.slice(0, suffixStart);
|
||||
}
|
||||
|
||||
export function buildGroupedObjectTreeNodes({
|
||||
nodeId,
|
||||
connectionId,
|
||||
|
||||
Reference in New Issue
Block a user