Skip to content

Commit 7b3ecee

Browse files
committed
Merge remote-tracking branch 'wenzhixin/master'
2 parents 336baca + f9a9bbb commit 7b3ecee

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/extensions/filter-control/bootstrap-table-filter-control.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,24 @@
246246
}, that.options.searchTimeOut);
247247
});
248248

249+
header.off('mouseup', 'input').on('mouseup', 'input', function (event) {
250+
var $input = $(this),
251+
oldValue = $input.val();
252+
253+
if (oldValue === "") return;
254+
255+
setTimeout(function(){
256+
var newValue = $input.val();
257+
258+
if (newValue === ""){
259+
clearTimeout(timeoutId);
260+
timeoutId = setTimeout(function () {
261+
that.onColumnSearch(event);
262+
}, that.options.searchTimeOut);
263+
}
264+
}, 1);
265+
});
266+
249267
if (header.find('.date-filter-control').length > 0) {
250268
$.each(that.columns, function (i, column) {
251269
if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'datepicker') {

0 commit comments

Comments
 (0)