Hello!
I have ui.list with drag one item, not multiselect.
item before Drop have index example= 5
//code
onAfterDrop:function(context, e){
//new Item index after drop, example = 2. Good.
console.log(context.index);
// Get index this item by Id
$$('filesPhotosEdit').files.getIndexById(context.start);
// this return OLD item index = 5
//This coder too return OLD item indexes
Object.entries($$('filesPhotosEdit').files.data.pull).forEach(function(item, i, arr) {
idF = item[0];
console.log($$('filesPhotosEdit').files.getIndexById(idF));
});
}
Why he return OLD item indexes ? How i get new item indexes?