mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-11-25 06:56:38 +00:00
set the value in the editor for results (#1799)
This commit is contained in:
parent
953bef404b
commit
00a816c488
@ -54,13 +54,17 @@ export class EditorReact extends React.Component<EditorReactProps, EditorReactSt
|
|||||||
const existingContent = this.editor.getModel().getValue();
|
const existingContent = this.editor.getModel().getValue();
|
||||||
|
|
||||||
if (this.props.content !== existingContent) {
|
if (this.props.content !== existingContent) {
|
||||||
this.editor.pushUndoStop();
|
if (this.props.isReadOnly) {
|
||||||
this.editor.executeEdits("", [
|
this.editor.setValue(this.props.content);
|
||||||
{
|
} else {
|
||||||
range: this.editor.getModel().getFullModelRange(),
|
this.editor.pushUndoStop();
|
||||||
text: this.props.content,
|
this.editor.executeEdits("", [
|
||||||
},
|
{
|
||||||
]);
|
range: this.editor.getModel().getFullModelRange(),
|
||||||
|
text: this.props.content,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user