Skip to Content
You are viewing the v12 docs of React Flow. You can find the latest version here.
ReferenceTypes

OnBeforeDelete

Source on GitHub 

The OnBeforeDelete type defines the callback function that is called before nodes or edges are deleted. This callback receives an object containing the nodes and edges that are about to be deleted.

type OnBeforeDelete = (params: { nodes: Node[]; edges: Edge[]; }) => Promise<boolean | { nodes: Node[]; edges: Edge[]; })>;
Parameters:
NameTypeDefault
__0{ nodes: NodeType[]; edges: EdgeType[]; }
Returns:
Promise<boolean | { nodes: NodeType[]; edges: EdgeType[]; }>
Last updated on