From ae648b801bebc7ffd006653e01e5ff6046632759 Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Thu, 16 Jan 2025 13:37:59 +0100 Subject: [PATCH] feature(react-tree): TreeRootReset component --- ...omponents-8e070f58-09e6-4a66-bd63-bbd13b27db88.json | 7 +++++++ ...eact-tree-b452026f-0282-4a88-a922-34c2a983c77c.json | 7 +++++++ .../react-components/react-components/src/index.ts | 1 + .../react-tree/library/etc/react-tree.api.md | 3 +++ .../react-tree/library/src/components/TreeProvider.tsx | 10 ++++++++++ .../react-components/react-tree/library/src/index.ts | 2 +- 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json create mode 100644 change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json diff --git a/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json b/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json new file mode 100644 index 00000000000000..ddc6a6c41d1080 --- /dev/null +++ b/change/@fluentui-react-components-8e070f58-09e6-4a66-bd63-bbd13b27db88.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "feature: TreeRootReset component", + "packageName": "@fluentui/react-components", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json b/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json new file mode 100644 index 00000000000000..7e09b55e865d5d --- /dev/null +++ b/change/@fluentui-react-tree-b452026f-0282-4a88-a922-34c2a983c77c.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "feature: TreeRootReset component", + "packageName": "@fluentui/react-tree", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-components/src/index.ts b/packages/react-components/react-components/src/index.ts index dc4d8fbed60524..1c0315c6d29141 100644 --- a/packages/react-components/react-components/src/index.ts +++ b/packages/react-components/react-components/src/index.ts @@ -1306,6 +1306,7 @@ export { useTreeItem_unstable, useTreeStyles_unstable, useTree_unstable, + TreeRootReset, } from '@fluentui/react-tree'; export type { diff --git a/packages/react-components/react-tree/library/etc/react-tree.api.md b/packages/react-components/react-tree/library/etc/react-tree.api.md index 1fbeac4b6638b2..419d5b136e4352 100644 --- a/packages/react-components/react-tree/library/etc/react-tree.api.md +++ b/packages/react-components/react-tree/library/etc/react-tree.api.md @@ -383,6 +383,9 @@ export const TreeProvider: { displayName: string; }; +// @public (undocumented) +export const TreeRootReset: (props: TreeRootResetProps) => JSX.Element; + // @public (undocumented) export type TreeSelectionValue = MultiSelectValue | SingleSelectValue; diff --git a/packages/react-components/react-tree/library/src/components/TreeProvider.tsx b/packages/react-components/react-tree/library/src/components/TreeProvider.tsx index ea5e678ee3e387..7e7883e6cb5fbc 100644 --- a/packages/react-components/react-tree/library/src/components/TreeProvider.tsx +++ b/packages/react-components/react-tree/library/src/components/TreeProvider.tsx @@ -21,3 +21,13 @@ export const TreeProvider = (props: React.ProviderProps ( + + {props.children} + +); diff --git a/packages/react-components/react-tree/library/src/index.ts b/packages/react-components/react-tree/library/src/index.ts index f018799865bba0..bb0478843dcf80 100644 --- a/packages/react-components/react-tree/library/src/index.ts +++ b/packages/react-components/react-tree/library/src/index.ts @@ -32,7 +32,7 @@ export { export type { FlatTreeSlots, FlatTreeProps, FlatTreeState } from './FlatTree'; -export { TreeProvider } from './components/TreeProvider'; +export { TreeProvider, TreeRootReset } from './components/TreeProvider'; export { useTreeContext_unstable,