mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Revert "Fix typeahead to avoid generating new backend request on each keypress. (#10596)"
This reverts commit 475febd004
.
This commit is contained in:
parent
c34d458b94
commit
cd2161e796
@ -123,11 +123,11 @@ export function queryPartEditorDirective($compile, templateSrv) {
|
||||
});
|
||||
|
||||
var typeahead = $input.data('typeahead');
|
||||
typeahead.lookup = _.debounce(function() {
|
||||
typeahead.lookup = function() {
|
||||
this.query = this.$element.val() || '';
|
||||
var items = this.source(this.query, $.proxy(this.process, this));
|
||||
return items ? this.process(items) : items;
|
||||
}, 500);
|
||||
};
|
||||
}
|
||||
|
||||
$scope.showActionsMenu = function() {
|
||||
|
@ -129,11 +129,11 @@ function (_, $, coreModule) {
|
||||
$input.typeahead({ source: $scope.source, minLength: 0, items: 10000, updater: $scope.updater, matcher: $scope.matcher });
|
||||
|
||||
var typeahead = $input.data('typeahead');
|
||||
typeahead.lookup = _.debounce(function() {
|
||||
typeahead.lookup = function () {
|
||||
this.query = this.$element.val() || '';
|
||||
var items = this.source(this.query, $.proxy(this.process, this));
|
||||
return items ? this.process(items) : items;
|
||||
}, 500);
|
||||
};
|
||||
|
||||
$button.keydown(function(evt) {
|
||||
// trigger typeahead on down arrow or enter key
|
||||
|
Loading…
Reference in New Issue
Block a user