The igTree nodeDropping and nodeDropped events should expose the tree in its arguments
Lipata opened this issue · comments
Is your feature request related to a problem? Please describe.
The igTree nodeDropping and nodeDropped events should expose the tree (ui.owner) in its arguments, like in the other events (like nodeExpanded)
Describe the solution you'd like
Expose tree in the arguments
@PlamenaMiteva @Lipata
dragStart
and nodeDropping/ed
already have ui.data
exposed, which needs to be adjusted for scenarios where the default copy behavior can't handle. It's just the events trigger with a separately generated node. Would be nice if manipulating the data in those events can be reflected back to the Tree drag & drop.
Just as FYI, besides the owner, we ended up exposing sourceNode
to the nodeDropping/ed
. So when dropping a node its child collection can be copied if needed.
To copy a node with its children between igTree-s, the sourceNode data can be extended like so on drop:
ignite-ui/tests/unit/tree/tree-test.js
Lines 5273 to 5275 in ea87a00