react-complex-tree icon indicating copy to clipboard operation
react-complex-tree copied to clipboard

Important Bug with ControlledEnvironment and Drag&Drop.

Open gpisano97 opened this issue 3 years ago • 1 comments
trafficstars

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.

gpisano97 avatar Jul 19 '22 11:07 gpisano97

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.

lukasbach avatar Aug 09 '22 17:08 lukasbach

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.

lukasbach avatar Oct 28 '22 23:10 lukasbach