Monaco: option to hide line numbers (#25920)

This commit is contained in:
Ryan McKinley
2020-06-30 14:05:34 -07:00
committed by GitHub
parent bbce01de04
commit d4239e6fd2
4 changed files with 37 additions and 18 deletions

View File

@@ -116,7 +116,7 @@ export class InspectJSONTab extends PureComponent<Props, State> {
render() {
const { dashboard } = this.props;
const { show } = this.state;
const { show, text } = this.state;
const selected = options.find(v => v.value === show);
const isPanelJSON = show === ShowContent.PanelJSON;
const canEdit = dashboard.meta.canEdit;
@@ -141,7 +141,9 @@ export class InspectJSONTab extends PureComponent<Props, State> {
width="100%"
height={height}
language="json"
value={this.state.text}
showLineNumbers={true}
showMiniMap={text && text.length > 100}
value={text || ''}
readOnly={!isPanelJSON}
onBlur={this.onTextChanged}
/>