Skip to Content
Svelte Flow 2 is out! Read the announcement →
ReferenceTypes

OnSelectionChange

Source on GitHub 

The OnSelectionChange type is a callback that is triggered when the selection of nodes or edges changes. It receives an object containing the incoming selection of nodes and edges.

type OnSelectionChange< NodeType extends Node = Node, EdgeType extends Edge = Edge > = (params: { nodes: NodeType[]; edges: EdgeType[] }) => void;
Parameters:
NameTypeDefault
params{ nodes: NodeType[]; edges: EdgeType[]; }
Returns:
void