Skip to content

Commit f211d64

Browse files
fogelekPatrycja Fogelman
andauthored
Patrycjaf/use tree navigation return type (#35283)
Co-authored-by: Patrycja Fogelman <patrycja.fogelman@microsoft.com>
1 parent 7a5cadd commit f211d64

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "added return type to useTreeNavigation hook",
4+
"packageName": "@fluentui/react-tree",
5+
"email": "patrycja.fogelman@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-tree/library/etc/react-tree.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export const useTreeItemStyles_unstable: (state: TreeItemState) => TreeItemState
466466

467467
// @public
468468
export function useTreeNavigation(navigationMode?: TreeNavigationMode): {
469-
navigate: (data: TreeNavigationData_unstable, focusOptions?: FocusOptions) => void;
469+
navigate: (data: TreeNavigationData_unstable, focusOptions?: FocusOptions) => HTMLElement | null;
470470
treeRef: React_2.RefCallback<HTMLElement>;
471471
forceUpdateRovingTabIndex: () => void;
472472
};

packages/react-components/react-tree/library/src/hooks/useTreeNavigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { useFocusFinders } from '@fluentui/react-tabster';
1717
* @param navigationMode - the navigation mode of the tree, 'tree' (default) or 'treegrid'
1818
*/
1919
export function useTreeNavigation(navigationMode: TreeNavigationMode = 'tree'): {
20-
navigate: (data: TreeNavigationData_unstable, focusOptions?: FocusOptions) => void;
20+
navigate: (data: TreeNavigationData_unstable, focusOptions?: FocusOptions) => HTMLElement | null;
2121
treeRef: React.RefCallback<HTMLElement>;
2222
forceUpdateRovingTabIndex: () => void;
2323
} {

0 commit comments

Comments
 (0)