diff --git a/packages/web/src/components/CodeEditor/index.jsx b/packages/web/src/components/CodeEditor/index.jsx index 10ef11c1..5b4fc985 100644 --- a/packages/web/src/components/CodeEditor/index.jsx +++ b/packages/web/src/components/CodeEditor/index.jsx @@ -24,17 +24,14 @@ function CodeEditor(props) { editorRef.current = editor; editor.onDidContentSizeChange((event) => { - const { - contentHeight, - contentHeightChanged, - } = event; + const { contentHeight, contentHeightChanged } = event; if (contentHeightChanged) { // cap the editor height at 500px const editorContentHeight = Math.min(500, contentHeight); setContainerHeight(editorContentHeight); - }; + } }); }; @@ -45,10 +42,8 @@ function CodeEditor(props) { defaultValue={defaultValue || ''} control={control} shouldUnregister={shouldUnregister} - render={({ - field, - }) => ( -
+ render={({ field }) => ( +
-
+
{ field.onChange(value, event); }} + onChange={(value, event) => { + field.onChange(value, event); + }} options={{ + fontSize: 13, automaticLayout: true, bracketPairColorization: true, formatOnPaste: true, minimap: { - enabled: false + enabled: false, }, overviewRulerLanes: 0, readOnly: disabled, @@ -84,7 +85,6 @@ function CodeEditor(props) { />
- )} /> );