react-complex-tree
react-complex-tree copied to clipboard
Important Bug with ControlledEnvironment and Drag&Drop.
Discussed in https://github.com/lukasbach/react-complex-tree/discussions/104
Originally posted by gpisano97 July 19, 2022 Hello, i'm using your component on React,js (17). I'm working with a big tree (with many nested children), and (with my team mates) we implemented a Controlled Environment (because we need to add and remove items), but the drag and drop logic is broken. We have filled the onDrop event and the "putting an item inside another" mechanism works. If we don't expand any Item also the reordering mechanism works, buf if we expand some Items and we try to move some child became all broken! The "target" element is wrong and in some cases (with the elements on bottom of the tree) also the "item" array is wrong!!! On "bestofreactjs.com" there is the issue #15, and seems to be similar. We are in trouble, this problems is making lose a big amount of time! How can we fix it ? Thanks all for the answers.
Best Regards.
As @madhums mentioned in the discussion, it would be helpful to see a codesandbox as an example of the specific issue, or some other details what makes the element wrong and under what circumstances this behavior can be reproduced.
I'll close this as I don't have any actionable details on this. Please note that I recently fixed some issues regarding dnd targets, which will be released in the following days, so there is a chance that might be fixed alongside this release.