Closed akramwahid closed 5 years ago
Hello @akramwahid , you will have to get the elements and iterate over it. Like:
dropEl: function(el, target, source, sibling) {
var _target = $(target.parentElement);
var sorted = [];
var nodes = jkanban.getBoardElements(_target.data("id"));
var currentOrder = 0;
nodes.forEach(function(value, index, array) {
sorted.push({
"id": $(value).data("eid"),
"order": currentOrder++
})
});
$("#working_sort_order").val(JSON.stringify(sorted));
},
thanks for this, this solved my problem
I want to save the order state of elements on the board in the backend db. I know we can listen for call back
dragendEl
ordragEl
in order to detect the item reordering inside a board, how can I get the new order when an item is reordered, I also want to store the order of the Board as well when I enabledragBoards
, your help is kindly appreciated