[Code] fallback with symbolInformation.name for typeahead (#40654)
This commit is contained in:
parent
10960015a0
commit
da69491d23
|
@ -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) {
|
||||
|
|
|
@ -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),
|
||||
};
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue