parent
7ee5147b26
commit
45002180a7
|
@ -32,6 +32,7 @@ jest.mock('react-ace', () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
jest.mock('brace/theme/textmate', () => 'brace/theme/textmate');
|
||||||
|
|
||||||
setHttpClient(axios.create());
|
setHttpClient(axios.create());
|
||||||
let server = null;
|
let server = null;
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { EuiCodeEditor } from "@elastic/eui";
|
import { EuiCodeEditor } from "@elastic/eui";
|
||||||
|
|
||||||
|
import 'brace/theme/textmate';
|
||||||
|
|
||||||
export class ShowJson extends React.PureComponent {
|
export class ShowJson extends React.PureComponent {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this.props.loadIndexData(this.props);
|
this.props.loadIndexData(this.props);
|
||||||
|
@ -26,10 +28,13 @@ export class ShowJson extends React.PureComponent {
|
||||||
return (
|
return (
|
||||||
<EuiCodeEditor
|
<EuiCodeEditor
|
||||||
mode="json"
|
mode="json"
|
||||||
theme="github"
|
theme="textmate"
|
||||||
isReadOnly
|
isReadOnly
|
||||||
setOptions={{ maxLines: Infinity }}
|
setOptions={{ maxLines: Infinity }}
|
||||||
value={json}
|
value={json}
|
||||||
|
editorProps={{
|
||||||
|
$blockScrolling: Infinity
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue