From 4b081074652cfc6fc57e829f4e8a9fca1f8dfd99 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Nov 2022 16:39:28 -0300 Subject: [PATCH 1/3] chore: add both options to useArrowNavigationGroup --- .../react-tabster/src/hooks/useArrowNavigationGroup.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-components/react-tabster/src/hooks/useArrowNavigationGroup.ts b/packages/react-components/react-tabster/src/hooks/useArrowNavigationGroup.ts index 7d89faec820a12..993b86f2427303 100644 --- a/packages/react-components/react-tabster/src/hooks/useArrowNavigationGroup.ts +++ b/packages/react-components/react-tabster/src/hooks/useArrowNavigationGroup.ts @@ -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 */ @@ -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: From 7281d2eb086923213915ec538d1324e312348bcd Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Nov 2022 17:08:59 -0300 Subject: [PATCH 2/3] chore: add changes --- ...react-tabster-caace24f-01b0-4a75-b0c1-286a6698b7ae.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-tabster-caace24f-01b0-4a75-b0c1-286a6698b7ae.json diff --git a/change/@fluentui-react-tabster-caace24f-01b0-4a75-b0c1-286a6698b7ae.json b/change/@fluentui-react-tabster-caace24f-01b0-4a75-b0c1-286a6698b7ae.json new file mode 100644 index 00000000000000..fb0a90ba8e503c --- /dev/null +++ b/change/@fluentui-react-tabster-caace24f-01b0-4a75-b0c1-286a6698b7ae.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Add both options to axis config", + "packageName": "@fluentui/react-tabster", + "email": "chassunc@microsoft.com", + "dependentChangeType": "patch" +} From c117e01b6190d8a1cb6796e419e3f4a6b47d23e9 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 7 Nov 2022 17:13:46 -0300 Subject: [PATCH 3/3] chore: update api --- .../react-components/react-tabster/etc/react-tabster.api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-components/react-tabster/etc/react-tabster.api.md b/packages/react-components/react-tabster/etc/react-tabster.api.md index 6cd1a8a36a2200..af80d9164e99d3 100644 --- a/packages/react-components/react-tabster/etc/react-tabster.api.md +++ b/packages/react-components/react-tabster/etc/react-tabster.api.md @@ -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;