diff --git a/src/editor/RelationEditor.jsx b/src/editor/RelationEditor.jsx index e3128d0..bac6103 100644 --- a/src/editor/RelationEditor.jsx +++ b/src/editor/RelationEditor.jsx @@ -56,8 +56,11 @@ export default class PayloadEditor extends Component { this.setState({ inputValue }); } - onSubmit = inputValue => { - this.setState({ inputValue }); + onSubmit = value => { + const inputValue = value ? value : this.state.inputValue; + + if (value) + this.setState({ inputValue }); const updated = this.state.connection.clone({ body: { type: 'TextualBody', @@ -104,7 +107,7 @@ export default class PayloadEditor extends Component { + onClick={() => this.onSubmit()}>