Skip to content

Commit 08ce179

Browse files
committed
Use correct column for ordering when the columns were reordered
1 parent e369ce6 commit 08ce179

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

assets/js/lib/datatables.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@
7575
request._dt = config.name;
7676

7777
//Try to resolve the original column index when the column was reordered (using the ColReorder plugin)
78-
//Only do this when _ColReorder_iOrigCol is available
79-
if (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
78+
if (dt.colReorder && dt.colReorder.transpose) {
8079
if (request.order && request.order.length) {
8180
request.order.forEach(function (order) {
82-
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol;
81+
order.column = dt.colReorder.transpose(order.column, "toOriginal");
8382
});
8483
}
8584
}

0 commit comments

Comments
 (0)