Skip to content

Commit

Permalink
Dev: A JS error was introduced with the column visiblity change - und…
Browse files Browse the repository at this point in the history
…efined variable.

- Need to use two iterators for the columns visible unfortunately
  • Loading branch information
Allan Jardine committed Dec 2, 2016
1 parent d9775c4 commit e9fc9da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .datatables-commit-sync
@@ -1 +1 @@
efbf0301821b93216c254e12409f489891b59a64
28b479ddf0d118dfc81bec4bb3201edf23e08a00
16 changes: 9 additions & 7 deletions media/js/jquery.dataTables.js
Expand Up @@ -8462,10 +8462,6 @@
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );



_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, recalc] );

_fnSaveState( settings );
};

Expand Down Expand Up @@ -8530,17 +8526,23 @@
} );

_api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
var ret = this.iterator( 'column', function ( settings, column ) {
var ret = this.iterator( 'column', function ( settings, column ) {
if ( vis === undefined ) {
return settings.aoColumns[ column ].bVisible;
} // else
__setColumnVis( settings, column, vis );
} );

// Group the column visibility changes
if ( vis !== undefined && ( calc === undefined || calc ) ) {
// Automatically adjust column sizing
this.columns.adjust();
this.columns.adjust();

// Fire the column visibility event after any recalc is done
this.iterator( 'column', function ( settings, column ) {
_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, calc] );
} );
}

return ret;
} );

Expand Down
8 changes: 4 additions & 4 deletions media/js/jquery.dataTables.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9fc9da

Please sign in to comment.