add functionality when user pressed enter key
This commit is contained in:
@@ -12,10 +12,9 @@ const Rename = (props: Props) => {
|
||||
|
||||
const handleKeyDown = (event: React.KeyboardEvent) => {
|
||||
if (event.key === "Escape") {
|
||||
console.log("esc");
|
||||
closeRemapFunction();
|
||||
} else if (event.key === "Enter") {
|
||||
console.log("enter pressed");
|
||||
renameCallback(file, newName);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user