allows defining custom 'move' logic for the component.
var dtable = {
view:"datatable",
// datatable config
drag:true,
externalData: function (data, id){
data.rank = data.rank || -1;
data.title = data.title || data.value;
return data;
}
};
The property function takes 3 parameters:
The function is called when a data item is about to be moved to the target component.
When you drag a data item to another component, it preserves its id, unless the target component contains an item with such an id. Then the item will receive a random id. The changed item is newdata. The second parameter, id, stores the initial id of the item and data stores the initial data object.