mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: remove clear seleciton logic on escape key press (#4735)
This commit is contained in:
parent
1561b710ca
commit
17ce1bceb6
@ -271,20 +271,6 @@ export const useMultipleSelect = (props: Props) => {
|
||||
[disabled, entitiesList, handleEntitySelection, isGroupSelected]
|
||||
);
|
||||
|
||||
// clear selection on escape key press
|
||||
useEffect(() => {
|
||||
if (disabled) return;
|
||||
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === "Escape") clearSelection();
|
||||
};
|
||||
|
||||
window.addEventListener("keydown", handleKeyDown);
|
||||
return () => {
|
||||
window.removeEventListener("keydown", handleKeyDown);
|
||||
};
|
||||
}, [clearSelection, disabled]);
|
||||
|
||||
// select entities on shift + arrow up/down key press
|
||||
useEffect(() => {
|
||||
if (disabled) return;
|
||||
|
Loading…
Reference in New Issue
Block a user