Tree and table dnd

Hello Webix Team,

https://snippet.webix.com/uz0mxyvx

I have single drop event for tree and table drag. I am using:

var context = webix.DragControl.getContext();
var item = context.from.getItem(context.source[0]);

to fetch the dragged item elements. But my parameters which I am getting in tree and table item are different. For example in my tree object: I have nodeType attribute which is not present in table dragged Item. I can not change the table config attributes. I am trying to add nodeType on onDragOut event. How can I add nodeType variable to dragged source so that I can fetch it on drop event.

Hello,
If the data items could not be changed, custom attributes can be added directly into the context object.
onDragOut event fires too often, so I would rather suggest using the onBeforeDrag event to modify the context of the current DnD process.
Please, check the following example: https://snippet.webix.com/6wh1ssma

But if you plan to use multiselect (select:"multiselect" is set in your datatable) and drag several items at once with different nodeType for each item, please note that context stores only IDs of dragged elements.
If you cannot update original data with the nodeType property (so it would be possible to get it like any other data property), as a solution, you can store all needed data in context as a hash nodeTypes for all items.
Please, check the following example: https://snippet.webix.com/ih7nxbtl