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

Fix click-based selection of typeahead suggestion
This commit is contained in:
David
2018-10-24 11:42:58 +02:00
committed by GitHub

View File

@@ -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 = () => {