[Code] fallback with symbolInformation.name for typeahead (#40654)

This commit is contained in:
Mengwei Ding 2019-07-10 09:58:35 -07:00 committed by GitHub
parent 10960015a0
commit da69491d23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -23,6 +23,9 @@ export const SuggestionComponent: SFC<Props> = props => {
// An util function to help highlight the substring which matches the query.
const renderMatchingText = (text: string) => {
if (!text) {
return text;
}
// Match the text with query in case sensitive mode first.
let index = text.indexOf(props.query);
if (index < 0) {

View file

@ -44,7 +44,7 @@ export class SymbolSuggestionsProvider extends AbstractSuggestionsProvider {
description: this.getSymbolDescription(symbol.symbolInformation.location),
end: 10,
start: 1,
text: symbol.qname,
text: symbol.qname ? symbol.qname : symbol.symbolInformation.name,
tokenType: this.symbolKindToTokenClass(symbol.symbolInformation.kind),
selectUrl: this.getSymbolLinkUrl(symbol.symbolInformation.location),
};

View file

@ -62,7 +62,6 @@ const xpackOption = {
},
};
// Skip because of issue: https://github.com/elastic/code/issues/1387
describe('code in multiple nodes', () => {
const codeNodeUuid = 'c4add484-0cba-4e05-86fe-4baa112d9e53';
const nonodeNodeUuid = '22b75e04-0e50-4647-9643-6b1b1d88beaf';