mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Grouping: Fix compatibility with columnSelector widget
This commit is contained in:
parent
6a663b5138
commit
86e2b7c355
@ -172,7 +172,10 @@
|
||||
|
||||
groupHeaderHTML : function( c, wo, data ) {
|
||||
var name = ( data.currentGroup || '' ).toString().replace(/</g, '<').replace(/>/g, '>');
|
||||
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 + '">' +
|
||||
@ -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 ],
|
||||
|
Loading…
Reference in New Issue
Block a user