Fix search filtered rows

This commit is contained in:
Mottie 2014-04-22 20:40:12 -05:00
parent 3a12af8e85
commit f75398c799

View File

@ -888,11 +888,10 @@ ts.filter = {
lastSearch = c.lastSearch || c.$table.data('lastSearch') || [];
$.each(filters, function(indx, val) {
// check for changes from beginning of filter; but ignore if there is a logical "or" in the string
searchFiltered = (val || '').indexOf(lastSearch[indx] || '') === 0 && searchFiltered && !/(\s+or\s+|\|)/g.test(val || '');
searchFiltered = (val || '').indexOf(lastSearch[indx]) === 0 && searchFiltered && !/(\s+or\s+|\|)/g.test(val || '');
});
// can't search when all rows are hidden - this happens when looking for exact matches
if (searchFiltered && $rows.filter('.' + wo.filter_filteredRow).length === 0) { searchFiltered = false; }
if (searchFiltered && $rows.not('.' + wo.filter_filteredRow).length === 0) { searchFiltered = false; }
if ((wo.filter_$anyMatch && wo.filter_$anyMatch.length) || filters[c.columns]) {
anyMatch = wo.filter_$anyMatch && wo.filter_$anyMatch.val() || filters[c.columns] || '';
if (c.sortLocaleCompare) {