From e83d48c8fd67430e6dd3e1d97e89c3ecfdadbdac Mon Sep 17 00:00:00 2001 From: Lukas Bach Date: Sat, 2 Mar 2024 20:20:34 +0100 Subject: [PATCH] fix: set TreeItemChildren prop "parentId" correctly --- next-release-notes.md | 7 ++++++- packages/core/src/tree/TreeManager.tsx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/next-release-notes.md b/next-release-notes.md index f13a34175..b90e66d63 100644 --- a/next-release-notes.md +++ b/next-release-notes.md @@ -2,4 +2,9 @@ - Add `setDomFocus` argument to focus-item methods to provide an escape hatch to set the focus state of an item in RCT without updating the DOM focus. This defaults to true in all existing methods to maintain the current behavior if - it is absent. \ No newline at end of file + it is absent. + +### Bug Fixes + +- Fix a bug where the `parentId` property in the `renderItemsContainer` render method was incorrectly set to the tree id + for the root container. \ No newline at end of file diff --git a/packages/core/src/tree/TreeManager.tsx b/packages/core/src/tree/TreeManager.tsx index 983ad8438..e4440697c 100644 --- a/packages/core/src/tree/TreeManager.tsx +++ b/packages/core/src/tree/TreeManager.tsx @@ -35,7 +35,7 @@ export const TreeManager = (): JSX.Element => { const treeChildren = ( <> - + {rootChildren ?? []}