Fix ace editor warnings (#18893)

* Fix ace editor warnings
This commit is contained in:
Jen Huang 2018-05-10 10:43:49 -07:00 committed by GitHub
parent 7ee5147b26
commit 45002180a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -32,6 +32,7 @@ jest.mock('react-ace', () => {
}
};
});
jest.mock('brace/theme/textmate', () => 'brace/theme/textmate');
setHttpClient(axios.create());
let server = null;

View file

@ -7,6 +7,8 @@
import React from "react";
import { EuiCodeEditor } from "@elastic/eui";
import 'brace/theme/textmate';
export class ShowJson extends React.PureComponent {
componentWillMount() {
this.props.loadIndexData(this.props);
@ -26,10 +28,13 @@ export class ShowJson extends React.PureComponent {
return (
<EuiCodeEditor
mode="json"
theme="github"
theme="textmate"
isReadOnly
setOptions={{ maxLines: Infinity }}
value={json}
editorProps={{
$blockScrolling: Infinity
}}
/>
);
}