1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

Dev fix: Volumne visiblity with scrolling enabled would misalign columns

- When creating the new visiblity methods, I forgot to have the table do
  a scroll draw to have the columns align correctly for the header and
  body. This commit fixes that.

- Also update the column visiblity example to use jQuery events rather
  than DOM0 events.
This commit is contained in:
Allan Jardine 2013-07-23 10:47:54 +01:00
parent c822eefc4e
commit 36f720ca60
2 changed files with 9 additions and 1 deletions

View File

@ -1 +1 @@
3b83c09e3756166db61b32453ddd02ce72bd42bb
061bdef6b1230f39ee0617af3f36d83f1a313b1f

View File

@ -7710,6 +7710,14 @@
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );
// Automatically adjust column sizing
_fnAdjustColumnSizing( settings );
// Realign columns for scrolling
if ( settings.oScroll.sX || settings.oScroll.sY ) {
_fnScrollDraw( settings );
}
_fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis] );
_fnSaveState( settings );