diff --git a/packages/dropdowns.next/src/elements/menu/Item.tsx b/packages/dropdowns.next/src/elements/menu/Item.tsx index c4febf29f35..ef7959d3a08 100644 --- a/packages/dropdowns.next/src/elements/menu/Item.tsx +++ b/packages/dropdowns.next/src/elements/menu/Item.tsx @@ -39,7 +39,7 @@ const ItemComponent = forwardRef( ref ) => { const { type: selectionType } = useItemGroupContext(); - const { focusedValue, getItemProps } = useMenuContext(); + const { focusedValue, getItemProps, isCompact } = useMenuContext(); const item = { ...toItem({ value, @@ -60,7 +60,6 @@ const ItemComponent = forwardRef( }) as LiHTMLAttributes & { ref: MutableRefObject }; const isActive = value === focusedValue; - const { isCompact } = useMenuContext(); const renderActionIcon = (iconType?: ItemType) => { switch (iconType) {