[Bug] Do not overwrite the content of JSONTextField while the user is editing such (#895)

* Do not overwrite the context of JSONTextField while the user is editing such

* Style changes

* Handle case where valid JSON could potentially be overwritten.
This commit is contained in:
Nash Kaminski
2018-02-16 10:40:46 -08:00
committed by Paulus Schoutsen
parent 83e34f3f95
commit 012e0981f2
+1
View File
@@ -32,6 +32,7 @@ export default class JSONTextArea extends Component {
}
componentWillReceiveProps({ value }) {
if (value === this.props.value) return;
this.setState({
value: JSON.stringify(value, null, 2),
isValid: true,