Skip to content

"Del" button allows delete #79

Description

@MarkAStevens04

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!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions