feat(core): allow passing object with only id to getConnectedEdges
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -322,7 +322,7 @@ export function getNodesInside(
|
||||
})
|
||||
}
|
||||
|
||||
export function getConnectedEdges(nodes: (Node | GraphNode)[], edges: GraphEdge[]) {
|
||||
export function getConnectedEdges(nodes: (Node | GraphNode | { id: string })[], edges: GraphEdge[]) {
|
||||
const nodeIds = nodes.map((node) => node.id)
|
||||
|
||||
return edges.filter((edge) => nodeIds.includes(edge.source) || nodeIds.includes(edge.target))
|
||||
|
||||
Reference in New Issue
Block a user