From 5786b3eab3be46382547aa417bfcfe4983228a71 Mon Sep 17 00:00:00 2001 From: Mottie Date: Mon, 22 Dec 2014 21:04:26 -0600 Subject: [PATCH] ColumnSelector: fix column index issue --- js/widgets/widget-columnSelector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/widgets/widget-columnSelector.js b/js/widgets/widget-columnSelector.js index 720b820e..6b4962f8 100644 --- a/js/widgets/widget-columnSelector.js +++ b/js/widgets/widget-columnSelector.js @@ -256,8 +256,8 @@ tsColSel = ts.columnSelector = { $popup.find('.tablesorter-column-selector') .html( colSel.$container.html() ) .find('input').each(function(){ - var isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx], - indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'); + var indx = $(this).toggleClass( wo.columnSelector_cssChecked, isChecked ).attr('data-column'), + isChecked = indx === 'auto' ? colSel.auto : colSel.states[indx]; $(this).prop( 'checked', isChecked ); }); colSel.$popup = $popup.on('change', 'input', function(){