fixes #4365 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c0d0f8d78d
commit
99f8f8fedb
@ -10,9 +10,7 @@ import { MouseEvent, useRef } from 'react';
|
||||
import { Keys } from 'react-hotkeys-hook';
|
||||
import { Key } from 'ts-key-enum';
|
||||
|
||||
import { SINGLE_ENTITY_SELECT_BASE_LIST } from '@/object-record/relation-picker/constants/SingleEntitySelectBaseList';
|
||||
import { DropdownScope } from '@/ui/layout/dropdown/scopes/DropdownScope';
|
||||
import { useSelectableList } from '@/ui/layout/selectable-list/hooks/useSelectableList';
|
||||
import { HotkeyEffect } from '@/ui/utilities/hotkey/components/HotkeyEffect';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';
|
||||
@ -69,9 +67,6 @@ export const Dropdown = ({
|
||||
const { isDropdownOpen, toggleDropdown, closeDropdown, dropdownWidth } =
|
||||
useDropdown(dropdownId);
|
||||
|
||||
const { handleResetSelectedPosition } = useSelectableList(
|
||||
SINGLE_ENTITY_SELECT_BASE_LIST,
|
||||
);
|
||||
const offsetMiddlewares = [];
|
||||
|
||||
if (isDefined(dropdownOffset.x)) {
|
||||
@ -108,7 +103,6 @@ export const Dropdown = ({
|
||||
|
||||
if (isDropdownOpen) {
|
||||
closeDropdown();
|
||||
handleResetSelectedPosition();
|
||||
}
|
||||
},
|
||||
});
|
||||
@ -122,10 +116,9 @@ export const Dropdown = ({
|
||||
[Key.Escape],
|
||||
() => {
|
||||
closeDropdown();
|
||||
handleResetSelectedPosition();
|
||||
},
|
||||
dropdownHotkeyScope.scope,
|
||||
[closeDropdown, handleResetSelectedPosition],
|
||||
[closeDropdown],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user