<li>In <spanclass="version">v2.22.0</span>, AnyMatch searches for specific columns will no longer save filter data to each targeted column. See the "AnyMatch Searches" section below.</li>
<li>In <spanclass="version">v2.20.0</span>, <ahref="https://github.com/MaksimProgr">@MasksimProgr</a> added a method to allow targeting a specific column using the anyMatch filter. Find more details in the AnyMatch section below.</li>
<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>The <aclass="alert"href="index.html#widget-filter-any-match"><code>filter_anyMatch</code></a> option 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>) targeting 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 the <code>filter_external</code> option; whereas, the bind search function can not set initial filter values and is usually executed after tablesorter initialization.</li>
<li>In <spanclass="version">v2.20.0</span>, the anyMatch filter can target specific columns using the following format:
<preclass="prettyprint lang-js">#:{query}</pre>
<ul>
<li>where <code>#</code> is the column <strong>one-based index</strong> (non-developers count from one)</li>
<li>and <code>{query}</code> is the specific column query.</li>
</ul>
<br>
You can disable this type of search by setting the new <code>filter_columnAnyMatch</code> option to <code>false</code>.
<h4>Examples</h4>
<ul>
<li><buttontype="button"data-column="all">4:>30</button> Find values > 30 in the age column</li>
<li><buttontype="button"data-column="all">2:aa</button> Include a fuzzy search (see <code>filter_defaultFilter</code> setting) and look for "aa" in the first name column (four results should show).</li>
<li><buttontype="button"data-column="all">1:5 && 7:12</button> Find ranks with a "5" in them and find dates with a "12" </li>
<li>This column specific anyMatch does not support using an OR column search like <code>1:5|7:12</code></li>
<spanclass="label label-info">* NOTE *</span> Fixed in <spanclass="version">v2.22.0</span>. <del>When a AnyMatch search of this type is active, it adds filter queries to specific columns, so if the filters are saved and you reload the page, the specified <em>column filters will become populated</em> along with the AnyMatch search</del>.
<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?%' ]