Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/menulist-windows-focuszone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fluentui-react-native/menu': patch
---

Wrap `MenuList` content in a `FocusZone` on react-native-windows so menu items support arrow-key, Home, and End navigation instead of being reachable only with Tab.
2 changes: 1 addition & 1 deletion packages/components/Menu/src/MenuList/MenuList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { useMenuListContextValue } from './useMenuListContextValue';
import { MenuListProvider } from '../context/menuListContext';
import { directComponent } from '@fluentui-react-native/framework-base';

const shouldHaveFocusZone = ['macos', 'win32'].includes(Platform.OS as string);
const shouldHaveFocusZone = ['macos', 'win32', 'windows'].includes(Platform.OS as string);
const focusLandsOnContainer = Platform.OS === 'macos';
const hasCircularNavigation = Platform.OS === ('win32' as any);

Expand Down
2 changes: 1 addition & 1 deletion packages/components/Menu/src/MenuList/MenuList.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface MenuListState extends Omit<MenuListProps, 'checked' | 'onChecke

export interface MenuListSlotProps {
root: React.PropsWithRef<IViewProps> & { gap?: number };
focusZone?: FocusZoneProps; // macOS and win32 only
focusZone?: FocusZoneProps; // macOS, win32, and windows only
scrollView?: ScrollViewProps;
}

Expand Down