diff --git a/example/src/Overview/index.tsx b/example/src/Overview/index.tsx
index 795c75b0..3723e075 100644
--- a/example/src/Overview/index.tsx
+++ b/example/src/Overview/index.tsx
@@ -200,6 +200,7 @@ const OverviewFlow = () => {
maxZoom={Infinity}
onNodesDelete={onNodesDelete}
onEdgesDelete={onEdgesDelete}
+ deleteKeyCode={null}
>
diff --git a/package-lock.json b/package-lock.json
index f03378e1..b252acf8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "react-flow-renderer",
- "version": "10.0.0-next.42",
+ "version": "10.0.0-next.43",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "react-flow-renderer",
- "version": "10.0.0-next.42",
+ "version": "10.0.0-next.43",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.16.7",
diff --git a/package.json b/package.json
index 51f2d283..44be5db6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-flow-renderer",
- "version": "10.0.0-next.42",
+ "version": "10.0.0-next.43",
"engines": {
"node": ">=12"
},
diff --git a/src/container/GraphView/index.tsx b/src/container/GraphView/index.tsx
index 79c69e62..8d3c2107 100644
--- a/src/container/GraphView/index.tsx
+++ b/src/container/GraphView/index.tsx
@@ -10,9 +10,9 @@ import { NodeTypes, EdgeTypes, ConnectionLineType, KeyCode, ReactFlowProps } fro
export interface GraphViewProps extends Omit {
nodeTypes: NodeTypes;
edgeTypes: EdgeTypes;
- selectionKeyCode: KeyCode;
- deleteKeyCode: KeyCode;
- multiSelectionKeyCode: KeyCode;
+ selectionKeyCode: KeyCode | null;
+ deleteKeyCode: KeyCode | null;
+ multiSelectionKeyCode: KeyCode | null;
connectionLineType: ConnectionLineType;
onlyRenderVisibleElements: boolean;
defaultZoom: number;
diff --git a/src/hooks/useGlobalKeyHandler.ts b/src/hooks/useGlobalKeyHandler.ts
index 3b979a86..1dff6db1 100644
--- a/src/hooks/useGlobalKeyHandler.ts
+++ b/src/hooks/useGlobalKeyHandler.ts
@@ -7,8 +7,8 @@ import { getConnectedEdges } from '../utils/graph';
import { EdgeChange, KeyCode, NodeChange, ReactFlowState } from '../types';
interface HookParams {
- deleteKeyCode: KeyCode;
- multiSelectionKeyCode: KeyCode;
+ deleteKeyCode: KeyCode | null;
+ multiSelectionKeyCode: KeyCode | null;
}
const selector = (s: ReactFlowState) => ({
diff --git a/src/types/component-props.ts b/src/types/component-props.ts
index f2e658bb..fa915184 100644
--- a/src/types/component-props.ts
+++ b/src/types/component-props.ts
@@ -74,9 +74,9 @@ export interface ReactFlowProps extends HTMLAttributes {
connectionLineType?: ConnectionLineType;
connectionLineStyle?: CSSProperties;
connectionLineComponent?: ConnectionLineComponent;
- deleteKeyCode?: KeyCode;
- selectionKeyCode?: KeyCode;
- multiSelectionKeyCode?: KeyCode;
+ deleteKeyCode?: KeyCode | null;
+ selectionKeyCode?: KeyCode | null;
+ multiSelectionKeyCode?: KeyCode | null;
zoomActivationKeyCode?: KeyCode;
snapToGrid?: boolean;
snapGrid?: [number, number];