From 768ef1a3ccf3624ca64ec445e69fdef57575a7cb Mon Sep 17 00:00:00 2001 From: "LNR-3VB9JR3\\as666499" Date: Mon, 8 Jun 2026 22:31:51 +0530 Subject: [PATCH 1/2] 258: Using the updater function for setting new value for trees to avoid an issue in dragging items between trees. Drag and drop between trees was not working if the target tree was unmounted and mounted before the drag operation. --- .../useControlledTreeEnvironmentProps.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/core/src/controlledEnvironment/useControlledTreeEnvironmentProps.ts b/packages/core/src/controlledEnvironment/useControlledTreeEnvironmentProps.ts index 39bd84c9..a9f1dba7 100644 --- a/packages/core/src/controlledEnvironment/useControlledTreeEnvironmentProps.ts +++ b/packages/core/src/controlledEnvironment/useControlledTreeEnvironmentProps.ts @@ -88,8 +88,11 @@ export const useControlledTreeEnvironmentProps = ({ const unregisterTree = useCallback( treeId => { onUnregisterTree?.(trees[treeId]); - delete trees[treeId]; - setTrees(trees); + setTrees(trees => { + const newTrees = {...trees}; + delete newTrees[treeId]; + return newTrees; + }); }, [onUnregisterTree, trees] ); From a0cff2e60bc11085276664ec63bc1e7f2391f2c4 Mon Sep 17 00:00:00 2001 From: "LNR-3VB9JR3\\as666499" Date: Mon, 8 Jun 2026 22:54:42 +0530 Subject: [PATCH 2/2] 258: updated release notes --- next-release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/next-release-notes.md b/next-release-notes.md index f77d5bd6..bf08e735 100644 --- a/next-release-notes.md +++ b/next-release-notes.md @@ -4,6 +4,7 @@ ### Features ### Bug Fixes and Improvements +- Fixes an issue where drag and drop between trees was not working after remount of the target tree(#258) ### Other Changes --> \ No newline at end of file