diff --git a/packages/xod-client/src/editor/components/inspectorWidgets/Widget.jsx b/packages/xod-client/src/editor/components/inspectorWidgets/Widget.jsx index 5c325432e..07489d870 100644 --- a/packages/xod-client/src/editor/components/inspectorWidgets/Widget.jsx +++ b/packages/xod-client/src/editor/components/inspectorWidgets/Widget.jsx @@ -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); } @@ -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.