Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: FixedColumns wasn't taking into account that there can be TH ele…

…ments in the TBODY these days in DataTables - thus is was skipping TH elements when calculating the widths to apply to the frozen columns, resulting in the sizes applied bying shifted by the number of TH elements used in the row. The fix is to use a selector that also pulls in TH elements. We could use the DataTables internal method _fnGetTdNodes (and ultimatily that will be the best thing to do), but for the moment we modify the selector to retail DT1.8 compatibility for FixedCOlumns.
  • Loading branch information...
commit 0d63ab829efcc9df7ea6d09b33e90edfd95328b6 1 parent 0241432
@DataTables authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 media/js/FixedColumns.js
View
4 media/js/FixedColumns.js
@@ -402,7 +402,7 @@ FixedColumns.prototype = {
var iLeftWidth = 0;
var iRightWidth = 0;
- $('tbody>tr:eq(0)>td', this.s.dt.nTable).each( function (i) {
+ $('tbody>tr:eq(0)>td, tbody>tr:eq(0)>th', this.s.dt.nTable).each( function (i) {
// Inner width is used to assign widths to cells
that.s.aiInnerWidths.push( $(this).width() );
@@ -425,7 +425,7 @@ FixedColumns.prototype = {
this.s.iLeftWidth = this.s.sLeftWidth == 'fixed' ?
iLeftWidth : (iLeftWidth/iScrollWidth) * 100;
}
-
+
if ( this.s.iRightWidth === null )
{
this.s.iRightWidth = this.s.sRightWidth == 'fixed' ?
Please sign in to comment.
Something went wrong with that request. Please try again.