You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way of knowing the index of all the draggable elements?
The only thing I have found is the current "order changed" or "item moved" element by using the event.dest.index (and this is relative to the parent). Haven't found a way of getting all of the elements indexes at once.
The intention is to save this positions on the database so I can retain their position when it changes.
The text was updated successfully, but these errors were encountered:
You can get it each time you move an element. Thats what i do:
orderChanged: function (event) {
//Mapped because i only need ID
var tasks = event.source.sortableScope.modelValue.map(function(a) {return a.id;});;
//Update tasks with new positions
console.log(tasks);
ctrl.updateSort(tasks);
}
Is there a way of knowing the index of all the draggable elements?
The only thing I have found is the current "order changed" or "item moved" element by using the event.dest.index (and this is relative to the parent). Haven't found a way of getting all of the elements indexes at once.
The intention is to save this positions on the database so I can retain their position when it changes.
The text was updated successfully, but these errors were encountered: