<li>In <spanclass="version">v2.18.0</span>, the external search data column can be set to multiple columns (<code>data-column="0-2,4,6-7"</code>). Please see the <ahref="example-widget-filter-external-inputs.html">Filter Widget External Inputs</a> demo for more details.</li>
<li>This is a demo of the <ahref="index.html#widget-filter-external"><code>filter_external</code></a> option (added <spanclass="version">v2.15</span>).</li>
<li>In <spanclass="version">v2.15</span>
<ul>
<li>The <aclass="alert"href="index.html#widget-filter-any-match"><code>filter_anyMatch</code></a> has been <spanclass="label alert">removed</span> (added <spanclass="version">v2.13.3</span>; removed in v2.15)</li>
<li>A new option <code>filter_external</code> has been added. It is set to a jQuery selector string (<code>'.search'</code>) or jQuery object (<code>$('.search')</code>) targetting an external input.</li>
<li>So now a table can include <em>both</em> a filter row (<code>filter_columnFilters</code> is <code>true</code>, i.e. the internal table filters) and any number of external search inputs (as set by the <code>filter_external</code> option).</li>
<li>The external search results must have a <code>data-column="#"</code> attribute set, where <code>#</code> is the index of the column (zero-based) that the input targets, to have an input search all table content, set the data column attribute to <code>"all"</code> to match any column.</li>
<li>The <ahref="index.html#function-bindsearch"><code>$.tablesorter.bindSearch</code> function</a> (<ahref="example-widget-filter-external-inputs.html">see demo</a>) does exactly the same thing as the <code>filter_external</code> option. The major difference is seen when using ajax to populate the table, the initial filter values can be set before tablesorter initialization when using teh <code>filter_external</code> option; whereas, the bind search function can not set initial filter values and is usually executed after tablesorter initialization.</li>
</ul>
</li>
</ul>
</div>
<h3><ahref="#">Limitations</a></h3>
<div>
<ul>
<li>The any-match search method has limitations applied. It does not support all of the per column search features! So, at this time, the following types of queries are not allowed as the results will cause confusion:
<li>Search operators - A search for values equal, greater or less than values (<code>>>= <= <</code>) is not allowed because tables that contain both numbers and text (in separate columns). For example:
"Fred"< 10 // false</pre>* For comparisons, letters have a greater <ahref="http://en.wikipedia.org/wiki/Ascii#ASCII_printable_characters">ASCII value</a> than numbers.
<li>Range query - A search for any number range (<code>1 - 10</code>) is not allowed because, if any columns contain text, then no rows will result. The examples are the same as the search operators examples above.</li>
<li>Not Match query - A search for not matches (<code>!a</code>) is not allowed because tables that contain both numbers and text (in separate columns) will always show all rows. For example:
"Fred".search("a") // -1 (a not match! so this row will always show)
"25".search("a") // -1 (a not match! so this row will always show)
"1/1/2014".search("a") // -1 (a not match! so this row will always show)</pre>
</li>
<li>Allowed filters include plain text matching, fuzzy search (<code>~</code>), exact match (<code>"</code>), wild card matches( <code>?</code> or <code>*</code>), regex (<code>/\d/g</code>), and logical and (<code>a && b</code>)/or (<code>a|b</code>) matches.</li>
<li>Setting this option should work properly with or without the column filters. The only issue you would have is if you triggered a search on the table using an array with undefined or null array values, like this:
<preclass="prettyprint lang-javascript">// apply "2?%" filter to the fifth column (zero-based index)
var columns = [];
columns[5] = '2?%';
// anyMatch will kick in on undefined column filters,
// unless the array looks like this: columns = [ '', '', '', '', '', '2?%' ]