Forráskód Böngészése

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

Fix click-based selection of typeahead suggestion
David 7 éve
szülő
commit
8f7686c5a7
1 módosított fájl, 2 hozzáadás és 1 törlés
  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 = () => {