-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Docs on drop target linearIndex
vs childIndex
#211
Comments
Hey! At the moment, there are no dedicated docs for that. The gist is essentially just to implement the When the user is dropping an item, he is hovering over an ("target") item. The target type provides details where on that item that is:
Regarding The item "Black" has the childIndex 2, and the linearIndex 5. Hope that was helpful, let me know if anything else is unclear! |
When trying to implement the way its done in the uncontrolled tree environment, I'm running into the issue of items not being iterable in the initial for loop? |
What do you mean? Can you provide the implementation for the handler that you used and a log output of what value the items property has? |
I was actually able to get it to not throw the error. Just would like an example of how to implement a simple custom onDrop handler that mimics the behavior of the uncontrolled tree. |
Ah okay. One example is the actual implementation of the uncontrolled tree, but I have to admit, that it is far from simple. Unfortunately, it has a lot of corner cases that it respects at the moment, so that is all I have as an example at the moment. |
Is your feature request related to a problem? Please describe.
Are there any docs on how to implement drop handlers (
<ControlledTreeEnvironment>
), specifically on how the drop target types should be interpreted and what the difference betweenlinearIndex
andchildIndex
is?The text was updated successfully, but these errors were encountered: