From 17ce1bceb6d8434c1711e7414108553279ee8f03 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Fri, 7 Jun 2024 18:18:47 +0530 Subject: [PATCH] chore: remove clear seleciton logic on escape key press (#4735) --- web/hooks/use-multiple-select.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/web/hooks/use-multiple-select.ts b/web/hooks/use-multiple-select.ts index fdb3c0b1c..0a0013eac 100644 --- a/web/hooks/use-multiple-select.ts +++ b/web/hooks/use-multiple-select.ts @@ -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;