mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Merge pull request #3425 from Icinga/fix/avoid-unnecessary-search-requests-3348
Don't search as long as the user is typing
This commit is contained in:
commit
7fc9d7995f
@ -13,6 +13,7 @@
|
|||||||
this.icinga = icinga;
|
this.icinga = icinga;
|
||||||
|
|
||||||
this.searchValue = '';
|
this.searchValue = '';
|
||||||
|
this.searchTimer = null;
|
||||||
this.initializeModules = true;
|
this.initializeModules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -213,7 +214,16 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_this.searchValue = $('#menu input.search').val();
|
_this.searchValue = $('#menu input.search').val();
|
||||||
return _this.autoSubmitForm(event);
|
|
||||||
|
if (_this.searchTimer !== null) {
|
||||||
|
clearTimeout(_this.searchTimer);
|
||||||
|
_this.searchTimer = null;
|
||||||
|
}
|
||||||
|
var _event = $.extend({}, event); // event seems gc'd once the timeout is over
|
||||||
|
_this.searchTimer = setTimeout(function () {
|
||||||
|
_this.submitForm(_event, true);
|
||||||
|
_this.searchTimer = null;
|
||||||
|
}, 500);
|
||||||
},
|
},
|
||||||
|
|
||||||
rememberSubmitButton: function(e) {
|
rememberSubmitButton: function(e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user