From 319cfb278c946e1418d096f3b4adad002548a9c0 Mon Sep 17 00:00:00 2001 From: Nicolas Gotchac Date: Wed, 19 Oct 2016 17:34:56 +0100 Subject: [PATCH] Custom Input props value change must be reflected (#2734) (#2735) --- js/src/ui/Form/Input/input.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/src/ui/Form/Input/input.js b/js/src/ui/Form/Input/input.js index 4d62f997c..d21637391 100644 --- a/js/src/ui/Form/Input/input.js +++ b/js/src/ui/Form/Input/input.js @@ -53,6 +53,12 @@ export default class Input extends Component { value: this.props.value } + componentWillReceiveProps (newProps) { + if (newProps.value !== this.props.value) { + this.setValue(newProps.value); + } + } + render () { const { value } = this.state; const { children, className, disabled, error, label, hint, multiLine, rows, type } = this.props;