Skip to content

Commit 672b3c3

Browse files
committed
Select row for Fixed Columns plugin
Simply adds/removes the class to the Fixed Columns plugin clones as needed.
1 parent 21701d3 commit 672b3c3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

js/dataTables.tableTools.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,20 @@ TableTools.prototype = {
16341634
if ( data[i].nTr )
16351635
{
16361636
$(data[i].nTr).addClass( that.classes.select.row );
1637+
1638+
// Update Fixed Columns plugin
1639+
if ( typeof that.s.dt._oFixedColumns !== 'undefined' )
1640+
{
1641+
if ( that.s.dt._oFixedColumns.dom.clone.left.body )
1642+
{
1643+
$(that.s.dt._oFixedColumns.dom.clone.left.body.rows[data[i].nTr.rowIndex]).addClass( that.classes.select.row );
1644+
}
1645+
1646+
if ( that.s.dt._oFixedColumns.dom.clone.right.body )
1647+
{
1648+
$(that.s.dt._oFixedColumns.dom.clone.right.body.rows[data[i].nTr.rowIndex]).addClass( that.classes.select.row );
1649+
}
1650+
}
16371651
}
16381652
}
16391653

@@ -1683,6 +1697,17 @@ TableTools.prototype = {
16831697
if ( data[i].nTr )
16841698
{
16851699
$(data[i].nTr).removeClass( that.classes.select.row );
1700+
1701+
// Update Fixed Columns plugin
1702+
if ( typeof that.s.dt._oFixedColumns !== 'undefined' ) {
1703+
if ( that.s.dt._oFixedColumns.dom.clone.left.body ) {
1704+
$(that.s.dt._oFixedColumns.dom.clone.left.body.rows[data[i].nTr.rowIndex]).removeClass( that.classes.select.row );
1705+
}
1706+
1707+
if ( that.s.dt._oFixedColumns.dom.clone.right.body ) {
1708+
$(that.s.dt._oFixedColumns.dom.clone.right.body.rows[data[i].nTr.rowIndex]).removeClass( that.classes.select.row );
1709+
}
1710+
}
16861711
}
16871712
}
16881713

0 commit comments

Comments
 (0)