NodeChange
The onNodesChange callback takes
an array of NodeChange objects that you should use to update your flow’s state.
The NodeChange type is a union of six different object types that represent that
various ways an node can change in a flow.
export type NodeChange =
| NodeDimensionChange
| NodePositionChange
| NodeSelectionChange
| NodeRemoveChange
| NodeAddChange
| NodeReplaceChange;Variant types
NodeDimensionChange
id: stringtype: "dimensions"dimensions?: Dimensionsresizing?: booleansetAttributes?: boolean | "width" | "height"
NodePositionChange
id: stringtype: "position"position?: XYPositionpositionAbsolute?: XYPositiondragging?: boolean
NodeSelectionChange
id: stringtype: "select"selected: boolean
NodeRemoveChange
id: stringtype: "remove"
NodeAddChange
item: NodeTypetype: "add"index?: number
NodeReplaceChange
id: stringitem: NodeTypetype: "replace"