refactor(general): fit view in store to prevent flickering, rename onLoad => onPaneReady
This commit is contained in:
@@ -2,11 +2,7 @@ import { useCallback } from 'react';
|
||||
import ReactFlow, {
|
||||
ReactFlowProvider,
|
||||
addEdge,
|
||||
applyNodeChanges,
|
||||
applyEdgeChanges,
|
||||
Controls,
|
||||
NodeChange,
|
||||
EdgeChange,
|
||||
Connection,
|
||||
CoordinateExtent,
|
||||
Position,
|
||||
@@ -71,7 +67,7 @@ const LayoutFlow = () => {
|
||||
edges={edges}
|
||||
onConnect={onConnect}
|
||||
nodeExtent={nodeExtent}
|
||||
onLoad={() => onLayout('TB')}
|
||||
onPaneReady={() => onLayout('TB')}
|
||||
onNodesChange={onNodesChange}
|
||||
onEdgesChange={onEdgesChange}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user