Skip to Content
✨ Svelte Flow 1.0 is here! Rewritten for Svelte 5 with many new features and improvements.

OnDelete

Source on GitHub 

The OnDelete type is a callback function that is called when nodes or edges are deleted from the flow. It receives the deleted nodes and edges.

type OnDelete< NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase, > = ({ nodes, edges }: { nodes: NodeType[]; edges: EdgeType[] }) => void;
Parameters:
NameTypeDefault
params{ nodes: NodeType[]; edges: EdgeType[]; }
Returns:
void
Last updated on