diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index e4356c6d2a1..a8de2f46f11 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -87,7 +87,7 @@
"query-string": "^6.13.7",
"re-resizable": "^6.6.1",
"react": "^16.13.1",
- "react-ace": "^5.10.0",
+ "react-ace": "^9.9.4",
"react-checkbox-tree": "^1.5.1",
"react-color": "^2.13.8",
"react-datetime": "^3.0.4",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 55f35c79c76..c4ad20023d1 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -139,7 +139,7 @@
"query-string": "^6.13.7",
"re-resizable": "^6.6.1",
"react": "^16.13.1",
- "react-ace": "^5.10.0",
+ "react-ace": "^9.4.4",
"react-checkbox-tree": "^1.5.1",
"react-color": "^2.13.8",
"react-datetime": "^3.0.4",
diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx
index ec64b9daf45..e663704ba21 100644
--- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx
+++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/TemplateParamsEditor.test.tsx
@@ -51,7 +51,7 @@ describe('TemplateParamsEditor', () => {
const spy = jest.spyOn(brace, 'acequire');
spy.mockReturnValue({ setCompleters: () => 'foo' });
await waitFor(() => {
- expect(baseElement.querySelector('#brace-editor')).toBeInTheDocument();
+ expect(baseElement.querySelector('#ace-editor')).toBeInTheDocument();
});
});
});
diff --git a/superset-frontend/src/SqlLab/main.less b/superset-frontend/src/SqlLab/main.less
index a6c47388971..7822b91d3cc 100644
--- a/superset-frontend/src/SqlLab/main.less
+++ b/superset-frontend/src/SqlLab/main.less
@@ -207,7 +207,7 @@ div.Workspace {
flex-direction: column;
}
- #brace-editor {
+ #ace-editor {
height: calc(100% - 51px);
flex-grow: 1;
}
diff --git a/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx b/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx
index 08ddf2f87ad..6d07fd70327 100644
--- a/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx
+++ b/superset-frontend/src/components/AsyncAceEditor/AsyncAceEditor.test.tsx
@@ -30,7 +30,7 @@ import AsyncAceEditor, {
AsyncAceEditorOptions,
} from 'src/components/AsyncAceEditor';
-const selector = '[id="brace-editor"]';
+const selector = '[id="ace-editor"]';
test('renders SQLEditor', async () => {
const { container } = render();
diff --git a/superset-frontend/src/components/AsyncAceEditor/index.tsx b/superset-frontend/src/components/AsyncAceEditor/index.tsx
index 2a5683574a8..412872cc48a 100644
--- a/superset-frontend/src/components/AsyncAceEditor/index.tsx
+++ b/superset-frontend/src/components/AsyncAceEditor/index.tsx
@@ -23,7 +23,7 @@ import {
Position,
TextMode as OrigTextMode,
} from 'brace';
-import AceEditor, { AceEditorProps } from 'react-ace';
+import AceEditor, { IAceEditorProps } from 'react-ace';
import AsyncEsmComponent, {
PlaceholderProps,
} from 'src/components/AsyncEsmComponent';
@@ -72,7 +72,7 @@ const aceModuleLoaders = {
export type AceModule = keyof typeof aceModuleLoaders;
-export type AsyncAceEditorProps = AceEditorProps & {
+export type AsyncAceEditorProps = IAceEditorProps & {
keywords?: AceCompleterKeyword[];
};
@@ -83,7 +83,7 @@ export type AsyncAceEditorOptions = {
defaultTheme?: AceEditorTheme;
defaultTabSize?: number;
placeholder?: React.ComponentType<
- PlaceholderProps & Partial
+ PlaceholderProps & Partial
> | null;
};
@@ -120,7 +120,6 @@ export default function AsyncAceEditor(
theme = inferredTheme,
tabSize = defaultTabSize,
defaultValue = '',
- value = '',
...props
},
ref,
@@ -153,7 +152,6 @@ export default function AsyncAceEditor(
theme={theme}
tabSize={tabSize}
defaultValue={defaultValue}
- value={value || ''}
{...props}
/>
);
diff --git a/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx b/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx
index e96291c9b64..16b2a1afbb7 100644
--- a/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx
+++ b/superset-frontend/src/dashboard/components/CssEditor/CssEditor.test.tsx
@@ -19,12 +19,12 @@
import React from 'react';
import { render, screen, waitFor } from 'spec/helpers/testing-library';
import { CssEditor as AceCssEditor } from 'src/components/AsyncAceEditor';
-import { AceEditorProps } from 'react-ace';
+import { IAceEditorProps } from 'react-ace';
import userEvent from '@testing-library/user-event';
import CssEditor from '.';
jest.mock('src/components/AsyncAceEditor', () => ({
- CssEditor: ({ value, onChange }: AceEditorProps) => (
+ CssEditor: ({ value, onChange }: IAceEditorProps) => (