Skip to content

Commit

Permalink
7bceadf844166e18631bbf022babaf83887d6956 Fix: If a column data type i…
Browse files Browse the repository at this point in the history
…s null when it is sorted, it should be resolved. This could happen after data has been invalidated (e.g. after column reordering).

DataTables/ColReorder#90

Sync to source repo @7bceadf844166e18631bbf022babaf83887d6956
  • Loading branch information
dtbuild committed Jan 16, 2025
1 parent 558ef8b commit 3090d51
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 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.2.1",
"last-sync": "11e67902670040579c9399abd88e22799fceb30c"
"last-sync": "7bceadf844166e18631bbf022babaf83887d6956"
}
4 changes: 4 additions & 0 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -5885,10 +5885,14 @@
displayMaster = oSettings.aiDisplayMaster,
aSort;

// Make sure the columns all have types defined
_fnColumnTypes(oSettings);

// Allow a specific column to be sorted, which will _not_ alter the display
// master
if (col !== undefined) {
var srcCol = oSettings.aoColumns[col];

aSort = [{
src: col,
col: col,
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: 4 additions & 0 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5850,10 +5850,14 @@ function _fnSort ( oSettings, col, dir )
displayMaster = oSettings.aiDisplayMaster,
aSort;

// Make sure the columns all have types defined
_fnColumnTypes(oSettings);

// Allow a specific column to be sorted, which will _not_ alter the display
// master
if (col !== undefined) {
var srcCol = oSettings.aoColumns[col];

aSort = [{
src: col,
col: col,
Expand Down

0 comments on commit 3090d51

Please sign in to comment.