Skip to content

Commit

Permalink
Merge pull request #1365 from yenyen/clear-button-filter-control
Browse files Browse the repository at this point in the history
ColumnSearch after click on clear button in IE
  • Loading branch information
wenzhixin committed Sep 8, 2015
2 parents 342a72e + 982be13 commit f9a9bbb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/extensions/filter-control/bootstrap-table-filter-control.js
Expand Up @@ -246,6 +246,24 @@
}, that.options.searchTimeOut);
});

header.off('mouseup', 'input').on('mouseup', 'input', function (event) {
var $input = $(this),
oldValue = $input.val();

if (oldValue === "") return;

setTimeout(function(){
var newValue = $input.val();

if (newValue === ""){
clearTimeout(timeoutId);
timeoutId = setTimeout(function () {
that.onColumnSearch(event);
}, that.options.searchTimeOut);
}
}, 1);
});

if (header.find('.date-filter-control').length > 0) {
$.each(that.columns, function (i, column) {
if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'datepicker') {
Expand Down

0 comments on commit f9a9bbb

Please sign in to comment.