Skip to Content
Vue Flow v2 is here and joins xyflow! Read more here →
ReferenceUtils

getConnectedEdges()

Source on GitHub 

The getConnectedEdges util returns every edge connected to any of the given nodes — an edge counts if either its source or target is one of those nodes.

import { getConnectedEdges } from '@xyflow/vue'; const connected = getConnectedEdges(selectedNodes, edges);

Signature

Parameters:
NameTypeDefault
nodesNodeType[]

Nodes you want to get the connected edges for.

edgesEdgeType[]

All edges.

Returns:
EdgeType[]

Array of edges that connect any of the given nodes with each other.