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

OnBeforeDelete

Source on GitHub 

The OnBeforeDelete type is a callback function that is called before nodes or edges are deleted. It can prevent deletion or modify the items to be deleted by returning false or a modified set of nodes and edges.

type OnBeforeDelete< NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase, > = ({ nodes, edges, }: { nodes: NodeType[]; edges: EdgeType[]; }) => Promise<boolean | { nodes: NodeType[]; edges: EdgeType[] }>;
Parameters:
NameTypeDefault
__0{ nodes: NodeType[]; edges: EdgeType[]; }
Returns:
Promise<boolean | { nodes: NodeType[]; edges: EdgeType[]; }>
Last updated on