feat(props): add connectOnClick

This commit is contained in:
moklick
2021-12-17 10:49:05 +01:00
parent 3206d49c15
commit d8b054c7d6
5 changed files with 20 additions and 3 deletions
+3
View File
@@ -134,6 +134,7 @@ export interface ReactFlowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
noWheelClassName?: string;
noPanClassName?: string;
fitViewOnInit?: boolean;
connectOnClick?: boolean;
}
export type ReactFlowRefType = HTMLDivElement;
@@ -221,6 +222,7 @@ const ReactFlow: FunctionComponent<ReactFlowProps> = forwardRef<ReactFlowRefType
noWheelClassName = 'nowheel',
noPanClassName = 'nopan',
fitViewOnInit = false,
connectOnClick = true,
...rest
},
ref
@@ -309,6 +311,7 @@ const ReactFlow: FunctionComponent<ReactFlowProps> = forwardRef<ReactFlowRefType
connectionMode={connectionMode}
translateExtent={translateExtent}
fitViewOnInit={fitViewOnInit}
connectOnClick={connectOnClick}
/>
{onSelectionChange && <SelectionListener onSelectionChange={onSelectionChange} />}
{children}