From dcda9a4c1d660a03d6a2bcd2eb7b3bdf00068c4e Mon Sep 17 00:00:00 2001 From: Kirill Shumilov Date: Thu, 17 Sep 2020 12:57:12 +0300 Subject: [PATCH] fix(xod-client): returned the lost method to make possible cancel changed value / change numbers with arrows in Inspector Pin inputs --- .../src/editor/components/inspectorWidgets/Widget.jsx | 5 +++++ 1 file changed, 5 insertions(+) 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.