Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions next-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-->
Original file line number Diff line number Diff line change
Expand Up @@ -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]
);
Expand Down