refactor(useHandleConnections): also return edge id

This commit is contained in:
moklick
2024-02-08 13:32:37 +01:00
parent 57270f3eb4
commit c3d5c8cdfa
6 changed files with 28 additions and 18 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ export function updateConnectionLookup(connectionLookup: ConnectionLookup, edgeL
const prevSource = connectionLookup.get(sourceKey) || new Map();
const prevTarget = connectionLookup.get(targetKey) || new Map();
const connection = { source, target, sourceHandle, targetHandle };
const connection = { edgeId: edge.id, source, target, sourceHandle, targetHandle };
edgeLookup.set(edge.id, edge);
connectionLookup.set(sourceKey, prevSource.set(`${target}-${targetHandle}`, connection));