608 fix hotkey scope and dropdown issues in the command menu (#11121)
Closes https://github.com/twentyhq/core-team-issues/issues/608 - Introduces a new hotkey scope `CommandMenuFocused` - Fixes hotkey scopes issues in the side panel
This commit is contained in:
@ -62,7 +62,7 @@ export const useDropdownV2 = () => {
|
||||
|
||||
const toggleDropdown = useRecoilCallback(
|
||||
({ snapshot }) =>
|
||||
(specificComponentId: string) => {
|
||||
(specificComponentId: string, customHotkeyScope?: HotkeyScope) => {
|
||||
const scopeId = getScopeIdFromComponentId(specificComponentId);
|
||||
const isDropdownOpen = snapshot
|
||||
.getLoadable(isDropdownOpenComponentState({ scopeId }))
|
||||
@ -71,7 +71,7 @@ export const useDropdownV2 = () => {
|
||||
if (isDropdownOpen) {
|
||||
closeDropdown(specificComponentId);
|
||||
} else {
|
||||
openDropdown(specificComponentId);
|
||||
openDropdown(specificComponentId, customHotkeyScope);
|
||||
}
|
||||
},
|
||||
[closeDropdown, openDropdown],
|
||||
|
||||
Reference in New Issue
Block a user