- Notifications
You must be signed in to change notification settings - Fork175
added node as return value in useDragHook#210
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The reason I just have the id being returned is because this little bit of advice given here: https://react-dnd.github.io/react-dnd/docs/api/use-drag#specification-object-members I'm not sure what the implications are by returning the node instead of the id. Can you explain what you need to know about the node when you're dragging between trees? |
dragging between trees in my implementation is checked on the server to do this, I pass the id and alias of the tree like currentTree: device Something like that Ideally, I need to understand which tree I'm dragging from. the dragging itself happens to me so that when I hover the dragged element over the node, a request is sent to the server he checks whether it is possible to drop into this node |
So you need to know the id of the tree and the id of the node? Is that all the data you need? |
Yes, it may be worth entering the treeName parameter in the initialization of the Tree component. Because it can be expensive to drive all year and I can see how to implement it and propose a new solution |
in the useDragHook hook, is it possible to somehow return not the id but the entire node?
solution to issues #209