Use correct column for ordering when the columns were reordered
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run

This commit is contained in:
Jan Böhmer 2025-08-31 01:44:26 +02:00
parent e369ce6db9
commit 08ce1795fc

View file

@ -75,11 +75,10 @@
request._dt = config.name; request._dt = config.name;
//Try to resolve the original column index when the column was reordered (using the ColReorder plugin) //Try to resolve the original column index when the column was reordered (using the ColReorder plugin)
//Only do this when _ColReorder_iOrigCol is available if (dt.colReorder && dt.colReorder.transpose) {
if (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
if (request.order && request.order.length) { if (request.order && request.order.length) {
request.order.forEach(function (order) { request.order.forEach(function (order) {
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol; order.column = dt.colReorder.transpose(order.column, "toOriginal");
}); });
} }
} }