chore: remove clear seleciton logic on escape key press (#4735)
This commit is contained in:
parent
1561b710ca
commit
17ce1bceb6
1 changed files with 0 additions and 14 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue