From 0e9c438b78e58f346f61b15224c7b0020e4fe73e Mon Sep 17 00:00:00 2001 From: Bernardo Sunderhus Date: Wed, 26 Jul 2023 12:32:07 +0200 Subject: [PATCH] bugfix: selector slot required when selection mode is defined (#28648) --- ...ui-react-tree-3b5f955f-0166-4e3b-85dc-82dddef56b0c.json | 7 +++++++ .../src/components/TreeItemLayout/useTreeItemLayout.tsx | 1 + 2 files changed, 8 insertions(+) create mode 100644 change/@fluentui-react-tree-3b5f955f-0166-4e3b-85dc-82dddef56b0c.json diff --git a/change/@fluentui-react-tree-3b5f955f-0166-4e3b-85dc-82dddef56b0c.json b/change/@fluentui-react-tree-3b5f955f-0166-4e3b-85dc-82dddef56b0c.json new file mode 100644 index 0000000000000..556aa23d8b80c --- /dev/null +++ b/change/@fluentui-react-tree-3b5f955f-0166-4e3b-85dc-82dddef56b0c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "bugfix: makes selector slot required when selection mode is defined", + "packageName": "@fluentui/react-tree", + "email": "bernardo.sunderhus@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx b/packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx index 8e195e14ca2fe..5687ddb7bf22e 100644 --- a/packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx +++ b/packages/react-components/react-tree/src/components/TreeItemLayout/useTreeItemLayout.tsx @@ -80,6 +80,7 @@ export const useTreeItemLayout_unstable = ( actions, expandIcon, selector: resolveShorthand(props.selector, { + required: selectionMode !== 'none', defaultProps: { checked, tabIndex: -1,