瀏覽代碼

Merge pull request #13773 from miqh/fix/click-typeahead-suggestion

Fix click-based selection of typeahead suggestion
David 7 年之前
父節點
當前提交
8f7686c5a7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      public/app/features/explore/QueryField.tsx

+ 2 - 1
public/app/features/explore/QueryField.tsx

@@ -198,7 +198,7 @@ class QueryField extends React.PureComponent<TypeaheadFieldProps, TypeaheadField
     if (textChanged && value.selection.isCollapsed) {
       // Need one paint to allow DOM-based typeahead rules to work
       window.requestAnimationFrame(this.handleTypeahead);
-    } else {
+    } else if (!this.resetTimer) {
       this.resetTypeahead();
     }
   };
@@ -402,6 +402,7 @@ class QueryField extends React.PureComponent<TypeaheadFieldProps, TypeaheadField
       typeaheadPrefix: '',
       typeaheadContext: null,
     });
+    this.resetTimer = null;
   };
 
   handleBlur = () => {