Skip to content

Commit

Permalink
e412ed5850e072210e68dba7a701a3291c64e88c Fix: When using a CSS select…
Browse files Browse the repository at this point in the history
…or for the column selector (`-api columns()`) the order is now guaranteed to be in column index order.

https://datatables.net/forums/discussion/80079

Sync to source repo @e412ed5850e072210e68dba7a701a3291c64e88c
  • Loading branch information
dtbuild committed Oct 23, 2024
1 parent 850d5ea commit 7a71113
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.1.8",
"last-sync": "d7fdab4d358a0beff9bc8eaf0139ada406293255"
"last-sync": "e412ed5850e072210e68dba7a701a3291c64e88c"
}
3 changes: 2 additions & 1 deletion js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -8583,7 +8583,8 @@
.map( function () {
return _fnColumnsFromHeader( this ); // `nodes` is column index complete and in order
} )
.toArray();
.toArray()
.sort();

if ( jqResult.length || ! s.nodeName ) {
return jqResult;
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8530,7 +8530,8 @@ var __column_selector = function ( settings, selector, opts )
.map( function () {
return _fnColumnsFromHeader( this ); // `nodes` is column index complete and in order
} )
.toArray();
.toArray()
.sort();

if ( jqResult.length || ! s.nodeName ) {
return jqResult;
Expand Down

0 comments on commit 7a71113

Please sign in to comment.