From 85c5cf2212daec09cedc8f85ceece9815e2a4540 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Thu, 28 Jul 2016 17:39:34 -0500 Subject: [PATCH] Filter: selected column query works again. Fixes #1267 Broken since a6b25ae4c0cc44dcf935568b2f100ae65117ea74 --- js/widgets/widget-filter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/widgets/widget-filter.js b/js/widgets/widget-filter.js index 4ba6b7df..aa1ed67a 100644 --- a/js/widgets/widget-filter.js +++ b/js/widgets/widget-filter.js @@ -1091,6 +1091,7 @@ fxn, ffxn, txt, wo = c.widgetOptions, showRow = true, + hasAnyMatchInput = wo.filter_$anyMatch && wo.filter_$anyMatch.length, // if wo.filter_$anyMatch data-column attribute is changed dynamically // we don't want to do an "anyMatch" search on one column using data @@ -1100,11 +1101,11 @@ tsf.multipleColumns( c, wo.filter_$anyMatch ) : []; data.$cells = data.$row.children(); - if ( data.anyMatchFlag && columnIndex.length > 1 || data.anyMatchFilter ) { + if ( data.anyMatchFlag && columnIndex.length > 1 || ( data.anyMatchFilter && !hasAnyMatchInput ) ) { data.anyMatch = true; data.isMatch = true; data.rowArray = data.$cells.map( function( i ) { - if ( $.inArray( i, columnIndex ) > -1 || data.anyMatchFilter ) { + if ( $.inArray( i, columnIndex ) > -1 || ( data.anyMatchFilter && !hasAnyMatchInput ) ) { if ( data.parsed[ i ] ) { txt = data.cacheArray[ i ]; } else {