EdgeChange
The onEdgesChange callback takes
an array of EdgeChange objects that you should use to update your flow’s state.
The EdgeChange type is a union of four different object types that represent that
various ways an edge can change in a flow.
export type EdgeChange =
| EdgeAddChange
| EdgeRemoveChange
| EdgeReplaceChange
| EdgeSelectionChange;Variants
EdgeAddChange
| Name | Type | Default |
|---|---|---|
item | EdgeType | |
type | "add" | |
index | number |
EdgeRemoveChange
| Name | Type | Default |
|---|---|---|
id | string | |
type | "remove" |
EdgeReplaceChange
| Name | Type | Default |
|---|---|---|
id | string | |
item | EdgeType | |
type | "replace" |
EdgeSelectionChange
| Name | Type | Default |
|---|---|---|
id | string | |
type | "select" | |
selected | boolean |
Last updated on