Goal
Right now, typing "backspace" is the only way to delete a Node / Edge when it is highlighted. It would be great if pressing the "Delete" (or "Del") key on your keyboard also caused selected nodes / edges to be deleted!
Context
Users might be used to different functionality for deleting from other programs. Our service should be as easy and quick to learn as other services!
Implementation Idea
In ReactFlow, there's a native property called deleteKeyCode on the ReactFlow element that allows you to specify which keys trigger deletion. The code would look something like:
<ReactFlow
nodes={nodes}
edges={edges}
deleteKeyCode={['Backspace', 'Delete']}
// ...your other props
/>
Our ReactFlow component lives inside src\react-app\App.tsx. Modify this component with this attribute, and we should have a working delete functionality!
Goal
Right now, typing "backspace" is the only way to delete a Node / Edge when it is highlighted. It would be great if pressing the "Delete" (or "Del") key on your keyboard also caused selected nodes / edges to be deleted!
Context
Users might be used to different functionality for deleting from other programs. Our service should be as easy and quick to learn as other services!
Implementation Idea
In ReactFlow, there's a native property called
deleteKeyCodeon theReactFlowelement that allows you to specify which keys trigger deletion. The code would look something like:Our
ReactFlowcomponent lives insidesrc\react-app\App.tsx. Modify this component with this attribute, and we should have a working delete functionality!