RowReordering not attached after visiting subpage of table

RowReordering not attached after visiting subpage of table

tomczynskitomczynski Posts: 6Questions: 4Answers: 1

Hello guys,

I'm using DataTables rowReordering function on my table but I've got this funky problem. Everything seems to work fine when I'm visiting my table page, but if I'll go to the subpage of directory the table is in when I'm returning to the table page ui-sortable-handle is not connected to the table elements and the drag functionality is not working, like if it was never loaded, weird part is that it's breaks the whole site like this. Visiting subpage of table page means that rowReording function won't apply to any table on the whole site (I've got few menu subpages with this tables). Only hard reload helps. It's like if the subpage is in the cache it cannot run rowReording function on my table object. Did any of you encountered this problem in the past?

This is how I'm using the rowReorder function:

var columnDefs = [];
columnDefs = [ { bSortable: false, aTargets: [ 0, 1, 2, 3, 4, 5, 6, 7 ] } ];
this.table = _this.$("#dataTable").dataTable({
dom: "<"table-wrapper"tp>",
columnDefs: columnDefs,
paging: false,
stateSave: true,
order: [[0, "asc"]],
}).rowReordering({
sURL: "/api/content/order",
sRequestType: "PUT",
"fnUpdateAjaxRequest": function(oAjaxRequest, oProperties, $dataTable) {
oAjaxRequest.data.SECURITY_TOKEN='';
}
}).api();

This discussion has been closed.