DataTable RowReorder : Table reset after drop.

DataTable RowReorder : Table reset after drop.

satshilsatshil Posts: 1Questions: 1Answers: 0

Environment

===========

jQuery JavaScript Library v1.12.3
DataTables 1.10.12
RowReorder 1.1.2

I setup my datatable with following settings

ajaxObj = new Object();
ajaxObj["url"]=/testAjaxData;
ajaxObj["type"]="POST";

rowReorder = {
selector: 'tr',
dataSrc: 1
};

DataTable( {
"paginationType": "full_numbers",
"sortCellsTop": true,
"processing": true,
"serverSide": true,
"ajax": ajaxObj,
"rowId": 0,
"rowReorder": rowReorder})

Ajax Data:

=============

{"draw":1,"recordsTotal":5,"recordsFiltered":5,"data":[[1,1,"home","Page","electrical","home","[V][E
][D]"],[2,2,"home","Page","led","home","[V][E][D]"],[3,3,"home 2","Page","electrical","home","[V][E]
[D]"],[4,4,"home 3","Page","electrical","home","[V][E][D]"],[7,7,"Products","Page Group","electrical"
,"electrical products","[V][E][D]"]]}

Problem:

=============
everything works fine till datatable.rowReorder.js line no. 537

dt.draw( false );

As soon as this is executed the table gets reverted to default values. I am clueless what's causing the problem.

Solutions applied:

================
I try to disable the line 537 but that results in two errors.
1. It throws ret.push not a function on drag start.
2. It stop triggering the events "row-reorder" which is required for server update.

Is there any possible solution available.

This discussion has been closed.