diff --git a/public/app/core/components/query_part/query_part_editor.ts b/public/app/core/components/query_part/query_part_editor.ts index c78ca8d74e6..138da186238 100644 --- a/public/app/core/components/query_part/query_part_editor.ts +++ b/public/app/core/components/query_part/query_part_editor.ts @@ -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() { diff --git a/public/app/core/directives/metric_segment.js b/public/app/core/directives/metric_segment.js index b11625227c7..2754f8d8c6e 100644 --- a/public/app/core/directives/metric_segment.js +++ b/public/app/core/directives/metric_segment.js @@ -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