Live searching/filtering for HTML tables in a jQuery plugin
quickListClear option that appends a quick list link which clears the filter.", and \.blur event on field change but not keyup or other related events.filterExpression) has been added. The default is unchanged—the literal filter string.
filterExpression to filterTableFindAny to perform an OR search which delimits on space or comma characters in the filter field. Thank you to Lukas for the implementation. An example page is included.filterExpression to filterTableFindAll to perform an AND search which delimits on space or comma characters in the filter field. Note that the matching is per-cell not per row, so each cell must have all terms to match. An example page is included.ignoreColumns option. Provide an array of column numbers (0-indexed) to ignore those columns during filtering. The default is no columns are ignored. An example page is included.ignoreClass option. Provide a class name to ignore those cells during filtering. The default is no classes are ignored. An exampled page is included. Thanks to geda0 for the idea.minChars option, thanks to Darius Kazemi, which specifies the minimum number of characters a user must enter into the filter field before filtering occurs. Default is 1, meaning the moment the user begins to type, filtering will occur.minRows bug fix.preventReturnKey option (true by default) has been added to allow you to switch back to the previous behavior of allowing the return key to submit forms.inputSelector option, within the code it was implemented as filterSelector. This has been corrected to match the documentation. Note that if you were previously using the filterSelector option to overcome this issue, you will need to change it to inputSelector to use the feature with this version.
inputSelector option, thanks to Pratik Thakkar, which specifies a selector for an existing element to use instead of creating a new filter input field. There are some caveats of which to be aware:
inputSelector returns more than one element.autofocus option, thanks to Robert McLeod, which is disabled by default. Note that autofocus is generally a bad idea for accessibility reasons, but if you do not need to be compliant or don't want to support accessibility users, it's a nice user experience option.quickListTag and quickListGroupTag options.inputName option.visibleClass option.$(selector).filterTable() again for dynamically created data without it affecting previously filtered tables.filter-table from table-filter to be consistent with the plugin name.