diff --git a/packages/react/src/components/ReactFlowProvider/index.tsx b/packages/react/src/components/ReactFlowProvider/index.tsx index 74f19f81..11a9c6b8 100644 --- a/packages/react/src/components/ReactFlowProvider/index.tsx +++ b/packages/react/src/components/ReactFlowProvider/index.tsx @@ -22,9 +22,9 @@ export type ReactFlowProviderProps = { /** When `true`, the flow will be zoomed and panned to fit all the nodes initially provided. */ fitView?: boolean; /** - * You can provide an object of options to customize the fitView behavior. + * You can provide an object of options to customize the initial fitView behavior. */ - fitViewOptions?: FitViewOptions; + initialFitViewOptions?: FitViewOptions; /** Initial minimum zoom level */ initialMinZoom?: number; /** Initial maximum zoom level */ @@ -93,7 +93,7 @@ export function ReactFlowProvider({ initialHeight: height, initialMinZoom: minZoom, initialMaxZoom: maxZoom, - fitViewOptions, + initialFitViewOptions: fitViewOptions, fitView, nodeOrigin, nodeExtent, diff --git a/packages/react/src/container/ReactFlow/Wrapper.tsx b/packages/react/src/container/ReactFlow/Wrapper.tsx index c2940399..9ae0aa62 100644 --- a/packages/react/src/container/ReactFlow/Wrapper.tsx +++ b/packages/react/src/container/ReactFlow/Wrapper.tsx @@ -53,7 +53,7 @@ export function Wrapper({ initialWidth={width} initialHeight={height} fitView={fitView} - fitViewOptions={fitViewOptions} + initialFitViewOptions={fitViewOptions} initialMinZoom={minZoom} initialMaxZoom={maxZoom} nodeOrigin={nodeOrigin}