allows defining custom 'move' logic for the component.
var dtable = {
view:"datatable",
...
drag:true,
externalData: function (data, id){
data.rank = data.rank || -1;
data.title = data.title || data.value;
return data;
}
};
The property function takes 2 parameters:
When you drag an item to another element, it will be moved to the target element with the same id it has in the source element. If the target element already contains an item with such id, the id for the item will be set randomly. At the same time, the second parameter of externalData will store the initial id of the item (the id in the source element).
Back to top