Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add relativeIndex to onDrop callback #200

Conversation

kristian-puccio
Copy link

This adds the relativeIndex property to the onDrop callback.
Closes #196

@minop1205
Copy link
Owner

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 minop1205 closed this Apr 27, 2023
@kristian-puccio
Copy link
Author

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing indexes to canDrop
2 participants