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} /> ); };