Skip to content

Commit 9ce11ee

Browse files
committed
Uncontrolled InputNumber to controlled InputNumber
1 parent 886503c commit 9ce11ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ export default class InputNumber extends React.Component {
239239
if (this.state.focused) {
240240
this.inputting = true;
241241
}
242-
const input = this.props.parser(this.getValueFromEvent(e));
243-
this.setState({ inputValue: input });
242+
const input = this.props.parser(this.getValueFromEvent(e));
244243
this.props.onChange(this.toNumberWhenUserInput(input)); // valid number or invalid string
245244
}
246245

0 commit comments

Comments
 (0)