Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Add both options to axis config",
"packageName": "@fluentui/react-tabster",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const useArrowNavigationGroup: (options?: UseArrowNavigationGroupOptions)

// @public (undocumented)
export interface UseArrowNavigationGroupOptions {
axis?: 'vertical' | 'horizontal' | 'grid';
axis?: 'vertical' | 'horizontal' | 'grid' | 'both';
circular?: boolean;
ignoreDefaultKeydown?: Types.FocusableProps['ignoreKeydown'];
memorizeCurrent?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface UseArrowNavigationGroupOptions {
* Focus will navigate vertically, horizontally or in both directions (grid), defaults to horizontally
* @defaultValue vertical
*/
axis?: 'vertical' | 'horizontal' | 'grid';
axis?: 'vertical' | 'horizontal' | 'grid' | 'both';
/**
* Focus will cycle to the first/last elements of the group without stopping
*/
Expand Down Expand Up @@ -60,6 +60,8 @@ function axisToMoverDirection(axis: UseArrowNavigationGroupOptions['axis']): Typ
return Types.MoverDirections.Horizontal;
case 'grid':
return Types.MoverDirections.Grid;
case 'both':
return Types.MoverDirections.Both;

case 'vertical':
default:
Expand Down