From 3c54d1bd306e08126d32bd949d77cbfc9400ee15 Mon Sep 17 00:00:00 2001 From: Rares Mardare Date: Tue, 23 May 2023 16:17:46 +0300 Subject: [PATCH] Fix autosuggestions in monaco editor (#1953) # What this PR does Bugfix for Monaco Editor on showing suggestions --- .../src/components/MonacoEditor/MonacoEditor.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/grafana-plugin/src/components/MonacoEditor/MonacoEditor.tsx b/grafana-plugin/src/components/MonacoEditor/MonacoEditor.tsx index ce16c0d6..ba0b9f25 100644 --- a/grafana-plugin/src/components/MonacoEditor/MonacoEditor.tsx +++ b/grafana-plugin/src/components/MonacoEditor/MonacoEditor.tsx @@ -83,11 +83,6 @@ const MonacoEditor: FC = (props) => { return ; } - const otherProps: any = {}; - if (useAutoCompleteList) { - otherProps.getSuggestions = { autoCompleteList }; - } - return ( = (props) => { width="100%" height={height} onEditorDidMount={handleMount} - {...otherProps} + getSuggestions={useAutoCompleteList ? autoCompleteList : undefined} /> ); };