diff --git a/src/components/DropdownMenu/DropdownMenuItem.tsx b/src/components/DropdownMenu/DropdownMenuItem.tsx index de34a87cee..aa5c155622 100644 --- a/src/components/DropdownMenu/DropdownMenuItem.tsx +++ b/src/components/DropdownMenu/DropdownMenuItem.tsx @@ -13,7 +13,7 @@ import {cnDropdownMenu} from './DropdownMenu.classname'; import {DropdownMenuPopup} from './DropdownMenuPopup'; import {DropdownMenuContext} from './DropdownMenuContext'; -export type DropdownMenuItemProps = DropdownMenuListItem & { +export type DropdownMenuItemProps = Omit, 'path'> & { popupProps?: Partial; closeMenu?: () => void; children?: ReactNode; diff --git a/src/components/utils/useListNavigation/useListNavigation.ts b/src/components/utils/useListNavigation/useListNavigation.ts index 3eccbc8ea9..4eaafc1a66 100644 --- a/src/components/utils/useListNavigation/useListNavigation.ts +++ b/src/components/utils/useListNavigation/useListNavigation.ts @@ -43,6 +43,11 @@ export function useListNavigation({ return; } + const canNavigate = items.some((item) => !skip?.(item)); + if (!canNavigate) { + return; + } + const anchor = anchorRef?.current; if (!anchor) { return;