refactor: both delete or backspace can be used to open modal (#1829)

* refactor: both delete or backspace can be used to open modal

* fix: 'Bulk Issue Delete' modal will open on single click
This commit is contained in:
Dakshesh Jain 2023-08-10 16:02:10 +05:30 committed by GitHub
parent 8c8668a3e6
commit f562fcd466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,6 @@ export const CommandPalette: React.FC = () => {
} else if (keyPressed === "b") { } else if (keyPressed === "b") {
e.preventDefault(); e.preventDefault();
toggleCollapsed(); toggleCollapsed();
} else if (keyPressed === "backspace") {
e.preventDefault();
setIsBulkDeleteIssuesModalOpen(true);
} }
} else { } else {
if (keyPressed === "c") { if (keyPressed === "c") {
@ -123,6 +120,9 @@ export const CommandPalette: React.FC = () => {
setIsCreateCycleModalOpen(true); setIsCreateCycleModalOpen(true);
} else if (keyPressed === "m") { } else if (keyPressed === "m") {
setIsCreateModuleModalOpen(true); setIsCreateModuleModalOpen(true);
} else if (keyPressed === "backspace" || keyPressed === "delete") {
e.preventDefault();
setIsBulkDeleteIssuesModalOpen(true);
} }
} }
}, },