mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(core-app): CB-1211 empty groups in nav-tree
This commit is contained in:
@@ -40,6 +40,13 @@ function sortManageable(connectionInfoResource: ConnectionInfoResource): (nodeA:
|
||||
const connectionA = connectionInfoResource.get(NodeManagerUtils.connectionNodeIdToConnectionId(nodeA.id));
|
||||
const connectionB = connectionInfoResource.get(NodeManagerUtils.connectionNodeIdToConnectionId(nodeB.id));
|
||||
|
||||
// if (!connectionA || !connectionB) {
|
||||
// if (connectionA === connectionB) {
|
||||
// return 0;
|
||||
// }
|
||||
// return connectionA ? 1 : -1;
|
||||
// }
|
||||
|
||||
const nodeAManageable = connectionA?.features.includes(EConnectionFeature.manageable);
|
||||
const nodeBManageable = connectionB?.features.includes(EConnectionFeature.manageable);
|
||||
|
||||
@@ -71,7 +78,9 @@ export function navigationTreeConnectionGroupFilter(
|
||||
|
||||
for (const node of nodes) {
|
||||
const connection = connectionInfoResource.get(NodeManagerUtils.connectionNodeIdToConnectionId(node.id));
|
||||
const manageable = connection?.features.includes(EConnectionFeature.manageable);
|
||||
const manageable = !!connection?.features.includes(EConnectionFeature.manageable);
|
||||
|
||||
console.log(!!connection, manageable);
|
||||
|
||||
let nextGroup = NAVIGATION_TREE_CONNECTION_GROUPS.unsorted;
|
||||
|
||||
@@ -101,6 +110,8 @@ export function navigationTreeConnectionGroupFilter(
|
||||
);
|
||||
}
|
||||
|
||||
console.log(groupedChildren);
|
||||
|
||||
return groupedChildren;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user