Skip to content

Commit

Permalink
647cb9ece7a5ccf3b7be18a8687d5980684627ca Fix: State saving and column…
Browse files Browse the repository at this point in the history
… visibility could cause rendering issues on reinitialisation

https://datatables.net/forums/discussion/79446

Sync to source repo @647cb9ece7a5ccf3b7be18a8687d5980684627ca
  • Loading branch information
dtbuild committed Jul 23, 2024
1 parent 558d193 commit ef1a2e0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 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.0",
"last-sync": "dd2fa24bf1b1cadf911521f34ac1f9dc1a1d66bf"
"last-sync": "647cb9ece7a5ccf3b7be18a8687d5980684627ca"
}
10 changes: 6 additions & 4 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -4742,14 +4742,16 @@
return;
}

/* Build and draw the header / footer for the table */
// Build the header / footer for the table
_fnBuildHead( settings, 'header' );
_fnBuildHead( settings, 'footer' );
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );

// Load the table's state (if needed) and then render around it and draw draw
// Load the table's state (if needed) and then render around it and draw
_fnLoadState( settings, init, function () {
// Then draw the header / footer
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );

// Local data load
// Check if there is data passing into the constructor
if ( init.aaData ) {
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.

10 changes: 6 additions & 4 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4689,14 +4689,16 @@ function _fnInitialise ( settings )
return;
}

/* Build and draw the header / footer for the table */
// Build the header / footer for the table
_fnBuildHead( settings, 'header' );
_fnBuildHead( settings, 'footer' );
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );

// Load the table's state (if needed) and then render around it and draw draw
// Load the table's state (if needed) and then render around it and draw
_fnLoadState( settings, init, function () {
// Then draw the header / footer
_fnDrawHead( settings, settings.aoHeader );
_fnDrawHead( settings, settings.aoFooter );

// Local data load
// Check if there is data passing into the constructor
if ( init.aaData ) {
Expand Down

0 comments on commit ef1a2e0

Please sign in to comment.