feat(store, flow)!: Add useNode/useEdge-state helpers

* for two way binding use the helpers
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 81c8145f3a
commit c80ab8fe50
5 changed files with 21 additions and 11 deletions
+2
View File
@@ -121,6 +121,8 @@ export type FlowOptions<N = any, E = N> = FlowProps<N, E>
export type UseVueFlow = {
store: FlowStore
useNodesState: (nodes: Node[]) => GraphNode[]
useEdgesState: (edges: Edge[]) => GraphEdge[]
applyNodeChanges: (changes: NodeChange[]) => void
applyEdgeChanges: (changes: EdgeChange[]) => void
} & FlowHooksOn