Closed kristian-puccio closed 1 year ago
Thank you!
I think the pull request certainly solves the problem in #196, but I think I need to add support for dragging from outside the tree as well.
Also, although it is an issue with the original code, it would be better to have some common code when passing indexes to onDrop and canDrop, and I felt the need to do some refactoring in this area.
Therefore, I'm very sorry, but I will close this PR for now and release a new one with the corrected problem soon.
@minop1205 Fair enough, I think your solution does sound better. One issue I found with having common code with onDrop and canDrop is that the placeholderIndex isn't ready when canDrop is called. At least I think...
This adds the relativeIndex property to the
onDrop
callback. Closes #196