Skip to content

Commit

Permalink
Fix: On update for header clone, always resize the header table
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Jardine committed Nov 11, 2014
1 parent f0f76f2 commit 7e72ac7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/dataTables.fixedHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,17 +735,17 @@ FixedHeader.prototype = {
var s = this.fnGetSettings();
var nTable = oCache.nNode;

/* Set the wrapper width to match that of the cloned table */
var iDtWidth = $(s.nTable).outerWidth();
oCache.nWrapper.style.width = iDtWidth+"px";
nTable.style.width = iDtWidth+"px";

if ( s.bInitComplete && !s.oCloneOnDraw.top )
{
this._fnClassUpdate( $('thead', s.nTable)[0], $('thead', nTable)[0] );
return;
}

/* Set the wrapper width to match that of the cloned table */
var iDtWidth = $(s.nTable).outerWidth();
oCache.nWrapper.style.width = iDtWidth+"px";
nTable.style.width = iDtWidth+"px";

/* Remove any children the cloned table has */
while ( nTable.childNodes.length > 0 )
{
Expand Down

0 comments on commit 7e72ac7

Please sign in to comment.