Skip to content

Commit

Permalink
0ab3b7948ac9a00f38124b771c13b5639ec33da4 Dev: Fix for ordering of col…
Browse files Browse the repository at this point in the history
…umns when there are more than 9 columns

https://datatables.net/forums/discussion/comment/236395/#Comment_236395

4d521162aea430eb8f114f655e02bb6b70e4a083 Merge branch 'master' of github.com:DataTables/DataTablesSrc

Sync to source repo @4d521162aea430eb8f114f655e02bb6b70e4a083
  • Loading branch information
dtbuild committed Oct 29, 2024
1 parent e9414a2 commit f3b1828
Show file tree
Hide file tree
Showing 5 changed files with 9 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": "2188b5449c82fd5d2bfb35719658eb0ab11a4518"
"last-sync": "4d521162aea430eb8f114f655e02bb6b70e4a083"
}
4 changes: 3 additions & 1 deletion js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -8584,7 +8584,9 @@
return _fnColumnsFromHeader( this ); // `nodes` is column index complete and in order
} )
.toArray()
.sort();
.sort(function (a, b) {
return a - b;
});

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.

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

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

0 comments on commit f3b1828

Please sign in to comment.