Skip to content

Commit

Permalink
Grouping: Fix compatibility with columnSelector widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Aug 31, 2017
1 parent 6a663b5 commit 86e2b7c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/widgets/widget-grouping.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@

groupHeaderHTML : function( c, wo, data ) {
var name = ( data.currentGroup || '' ).toString().replace(/</g, '&lt;').replace(/>/g, '&gt;');
return '<tr class="group-header ' + c.selectorRemove.slice(1) +
return '<tr class="group-header ' + c.selectorRemove.slice(1) + ' ' +
// prevent grouping row from being hidden by the columnSelector;
// classHasSpan option added 2.29.0
( wo.columnSelector_classHasSpan || 'hasSpan' ) +
'" unselectable="on" ' + ( c.tabIndex ? 'tabindex="0" ' : '' ) + 'data-group-index="' +
data.groupIndex + '">' +
'<td colspan="' + c.columns + '">' +
Expand Down Expand Up @@ -221,6 +224,10 @@
}
}
}
if ( ts.hasWidget( c.table, 'columnSelector' ) ) {
// make sure to handle the colspan adjustments of the grouping rows
ts.columnSelector.setUpColspan( c, wo );
}
},
insertGroupHeader: function( c, wo, data ) {
var $header = c.$headerIndexed[ data.column ],
Expand Down

0 comments on commit 86e2b7c

Please sign in to comment.