Skip to content

Commit

Permalink
fix(xod-client): returned the lost method to make possible cancel cha…
Browse files Browse the repository at this point in the history
…nged value / change numbers with arrows in Inspector Pin inputs
  • Loading branch information
brusherru committed Sep 17, 2020
1 parent f80a372 commit dcda9a4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Widget extends React.Component {
this.onChange = this.onChange.bind(this);
this.onBlur = this.onBlur.bind(this);
this.onKeyDown = this.onKeyDown.bind(this);
this.updateValue = this.updateValue.bind(this);

this.shouldComponentUpdate = deepSCU.bind(this);
}
Expand All @@ -64,6 +65,10 @@ class Widget extends React.Component {
this.setState({ value }, commitCallback);
}

updateValue(newValue) {
this.setState({ value: newValue });
}

commit(valueUpdateCallback = noop) {
// Prevent of commiting widgets without changes provided by User
// E.G.
Expand Down

0 comments on commit dcda9a4

Please sign in to comment.