EdgeChange
Source on GitHub (opens in a new tab)
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
| EdgeResetChange
| EdgeSelectionChange;Variants
EdgeAddChange
| Name | Type |
|---|---|
# type | "add" |
# item | Edge<T> |
# index | number | undefined |
EdgeRemoveChange
| Name | Type |
|---|---|
# type | "remove" |
# id | string |
EdgeReplaceChange
| Name | Type |
|---|---|
# type | "replace" |
# id | string |
# item | Edge<T> |
EdgeSelectionChange
| Name | Type |
|---|---|
# type | "select" |
# id | string |
# selected | boolean |