Skip to content

Commit

Permalink
Ignore hotkeys when renaming <TreeItem />
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaCWebDeveloper committed May 23, 2024
1 parent fad04fa commit 9114121
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,18 @@ export const TreeItem = ({

const handleNameKeydown = useCallback(
(e: KeyboardEvent) => {
// ignore if renaming
if (isRenaming) {
return;
}

switch (e.key) {
case 'Delete':
handleDeleteClick(e);
break;
}
},
[handleDeleteClick]
[handleDeleteClick, isRenaming]
);

// open when descendent flow becomes selected
Expand Down

0 comments on commit 9114121

Please sign in to comment.