-
Notifications
You must be signed in to change notification settings - Fork 11
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
Drag and Drop Event Listeners ?? is there any #310
Comments
Hi @AbdullahMateen, I've taken a look through and I'm not seeing a good way to achieve what you're looking for. The built-in drag and drop is pretty sparse (I built it for a specific use case I had once) and I need to give it an update at some point. As you noticed, to support your requests it would need a way to hook into the drag and drop events and also emit an event detailing the move, assuming you can't watch the original data. Outside of adding enhancements that won't help you immediately, you would have limited options I think. One that I know has been done by others is to implement your own drag-and-drop handlers instead of using the drag-and-drop provided by the component. The main difficulty with that is making sure you can map the dragged element to your data model somehow. Another option would be to fork the repo and just add your code in the mixins. Since the 3.x line is mostly in maintenance mode at this point, it's a low risk for missing newer changes to the tree component. |
ok thanks for your response. i look for workaround as u mentioned. |
Hi @grapoza related to these points
i have achievied this using these settings though it is not a proper solution but it fit my scenario ├── Layer 1 (root) { treeNodeSpec: { draggable: false, allowDrop: false }, }
├── Layer 2 (head) { treeNodeSpec: { draggable: false, allowDrop: true }, }
├── Layer 3 (child) { treeNodeSpec: { draggable: true, allowDrop: false }, } hope this might help someone else who has similar scenario |
it might be helpfull if we could have properties like allowDrop: true or allowDrop: ['before', 'after', 'child', 'all'], |
Consider i have a three layer tree view. There are few things that i want to achieve with it.
The text was updated successfully, but these errors were encountered: