mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[PresentationUtil] Fix Canvas expression autocomplete (#146425)
Fixes #146243 ## Summary Fixes Canvas expression autocomplete https://github.com/elastic/kibana/pull/143739 upgraded the monaco-editor dependency which uses a callback to the `onLanguage` method to initialize the expressions. The PR moved the `monaco.languages.register` command inside this callback and which was never triggered. Moving the `monaco.languages.register` command outside the callback appears to fix the issue.
This commit is contained in:
parent
55b59722f7
commit
19413b7daa
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ export function registerExpressionsLanguage(functions: ExpressionFunction[]) {
|
|||
expressionsLanguage.keywords = functions.map((fn) => fn.name);
|
||||
expressionsLanguage.deprecated = functions.filter((fn) => fn.deprecated).map((fn) => fn.name);
|
||||
monaco.languages.onLanguage(EXPRESSIONS_LANGUAGE_ID, () => {
|
||||
monaco.languages.register({ id: EXPRESSIONS_LANGUAGE_ID });
|
||||
monaco.languages.setMonarchTokensProvider(EXPRESSIONS_LANGUAGE_ID, expressionsLanguage);
|
||||
});
|
||||
monaco.languages.register({ id: EXPRESSIONS_LANGUAGE_ID });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue