Skip to content

Commit

Permalink
Filter bindSearch elements now clear on filterReset event
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Nov 20, 2013
1 parent 6a108a6 commit daa9a1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/jquery.tablesorter.widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ ts.filter = {
bindSearch: function(table, $el) {
table = $(table)[0];
var external, wo = table.config.widgetOptions;
$el.unbind('keyup search').bind('keyup search', function(event, filter) {
$el.unbind('keyup search filterReset')
.bind('keyup search', function(event, filter) {
// emulate what webkit does.... escape clears the filter
if (event.which === 27) {
this.value = '';
Expand All @@ -730,6 +731,9 @@ ts.filter = {
});
}
ts.filter.searching(table, filter, external);
})
.bind('filterReset', function(){
$el.val('');
});
},
checkFilters: function(table, filter) {
Expand Down

0 comments on commit daa9a1b

Please sign in to comment.