[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:
parent
83e34f3f95
commit
012e0981f2
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user