Skip to content

Commit

Permalink
8bbeef5d284dda6075031d11ad4dcd758893dd37 Fix: With ordering disabled,…
Browse files Browse the repository at this point in the history
… changing column visibility would throw an error

DataTables/DataTablesSrc#288

192e191def3e788802f3a397f4bd0fe8a2c5b09c Merge branch 'master' of github.com:DataTables/DataTablesSrc

Sync to source repo @192e191def3e788802f3a397f4bd0fe8a2c5b09c
  • Loading branch information
dtbuild committed Aug 8, 2024
1 parent a48ba14 commit 100c9ea
Show file tree
Hide file tree
Showing 5 changed files with 15 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.3",
"last-sync": "18e89b984e01160631890b326914f3f98bbdf629"
"last-sync": "192e191def3e788802f3a397f4bd0fe8a2c5b09c"
}
7 changes: 6 additions & 1 deletion js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -12738,6 +12738,12 @@
return; // table, not a nested one
}

var sorting = ctx.sortDetails;

if (! sorting) {
return;
}

var i;
var orderClasses = classes.order;
var columns = ctx.api.columns( cell );
Expand All @@ -12746,7 +12752,6 @@
var ariaType = '';
var indexes = columns.indexes();
var sortDirs = columns.orderable(true).flatten();
var sorting = ctx.sortDetails;
var orderedColumns = _pluck(sorting, 'col');

cell
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.

7 changes: 6 additions & 1 deletion js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12685,6 +12685,12 @@ $.extend( true, DataTable.ext.renderer, {
return; // table, not a nested one
}

var sorting = ctx.sortDetails;

if (! sorting) {
return;
}

var i;
var orderClasses = classes.order;
var columns = ctx.api.columns( cell );
Expand All @@ -12693,7 +12699,6 @@ $.extend( true, DataTable.ext.renderer, {
var ariaType = '';
var indexes = columns.indexes();
var sortDirs = columns.orderable(true).flatten();
var sorting = ctx.sortDetails;
var orderedColumns = _pluck(sorting, 'col');

cell
Expand Down

0 comments on commit 100c9ea

Please sign in to comment.