From 6a663b5138a8ec4210d4c1976f3ae6947b20b3f0 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Thu, 31 Aug 2017 17:17:54 -0500 Subject: [PATCH] ColumnSelector: Fix compatibility with grouping widget --- js/widgets/widget-columnSelector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/widgets/widget-columnSelector.js b/js/widgets/widget-columnSelector.js index 8ec345e6..0ce7b3bd 100644 --- a/js/widgets/widget-columnSelector.js +++ b/js/widgets/widget-columnSelector.js @@ -402,7 +402,9 @@ autoModeOn = wo.columnSelector_mediaquery && colSel.auto, // find all header/footer cells in case a regular column follows a colspan; see #1238 $headers = c.$table.children( 'thead, tfoot' ).children().children() - .add( $(c.namespace + '_extra_table').children( 'thead, tfoot' ).children().children() ), + .add( $(c.namespace + '_extra_table').children( 'thead, tfoot' ).children().children() ) + // include grouping widget headers (they have colspans!) + .add( c.$table.find( '.group-header' ).children() ), len = $headers.length; for ( index = 0; index < len; index++ ) { $cell = $headers.eq(index); @@ -422,7 +424,7 @@ $cell.addClass( filtered ); } } else if ( typeof colSel.states[ col ] !== 'undefined' && colSel.states[ col ] !== null ) { - $cell.toggleClass( filtered, !colSel.states[ col ] ); + $cell.toggleClass( filtered, !autoModeOn && !colSel.states[ col ] ); } } }, @@ -552,7 +554,6 @@ .removeClass( wo.filter_filteredRow || 'filtered' ); c.$table.find('[data-col-span]').each(function(indx, el) { var $el = $(el); - console.log($el, $el.attr('data-col-span')); $el.attr('colspan', $el.attr('data-col-span')); }); c.$table.off('updateAll' + namespace + ' update' + namespace);