Fix action menu dropdown (#8368)
Fix action menu dropdown not closing when clicking outside the table or board and introduce helper functions to get the action menu component ids.
This commit is contained in:
@ -15,13 +15,13 @@ import { DropdownScope } from '@/ui/layout/dropdown/scopes/DropdownScope';
|
||||
import { HotkeyEffect } from '@/ui/utilities/hotkey/components/HotkeyEffect';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';
|
||||
import { useListenClickOutside } from '@/ui/utilities/pointer-event/hooks/useListenClickOutside';
|
||||
import { getScopeIdFromComponentId } from '@/ui/utilities/recoil-scope/utils/getScopeIdFromComponentId';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
import { useDropdown } from '../hooks/useDropdown';
|
||||
import { useInternalHotkeyScopeManagement } from '../hooks/useInternalHotkeyScopeManagement';
|
||||
|
||||
import { useListenClickOutsideV2 } from '@/ui/utilities/pointer-event/hooks/useListenClickOutsideV2';
|
||||
import { DropdownMenu } from './DropdownMenu';
|
||||
import { DropdownOnToggleEffect } from './DropdownOnToggleEffect';
|
||||
|
||||
@ -112,8 +112,9 @@ export const Dropdown = ({
|
||||
onClickOutside?.();
|
||||
};
|
||||
|
||||
useListenClickOutside({
|
||||
useListenClickOutsideV2({
|
||||
refs: [refs.floating],
|
||||
listenerId: dropdownId,
|
||||
callback: () => {
|
||||
onClickOutside?.();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user