From 9ce11ee867d77ad83b272ffe0b44cc5b57c4bb0a Mon Sep 17 00:00:00 2001 From: arifemrecelik Date: Fri, 4 Jan 2019 14:37:10 +0300 Subject: [PATCH] Uncontrolled InputNumber to controlled InputNumber --- src/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 6c220430..4b792a85 100644 --- a/src/index.js +++ b/src/index.js @@ -239,8 +239,7 @@ export default class InputNumber extends React.Component { if (this.state.focused) { this.inputting = true; } - const input = this.props.parser(this.getValueFromEvent(e)); - this.setState({ inputValue: input }); + const input = this.props.parser(this.getValueFromEvent(e)); this.props.onChange(this.toNumberWhenUserInput(input)); // valid number or invalid string }