Skip to content

Commit

Permalink
Fixed broken 'OK' button on tag editor
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Nov 26, 2022
1 parent ecc5edf commit c2a687e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/editor/RelationEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -104,7 +107,7 @@ export default class PayloadEditor extends Component {

<span
className="r6o-icon ok"
onClick={this.onSubmit}>
onClick={() => this.onSubmit()}>
<CheckIcon width={14} />
</span>
</div>
Expand Down

0 comments on commit c2a687e

Please sign in to comment.