remove the lambda used in input-number render() function

This commit is contained in:
Rick Zhou 2019-02-03 23:43:47 -08:00 committed by 偏右
parent 6ef24cf833
commit 80e6204803

View File

@ -38,6 +38,10 @@ export default class InputNumber extends React.Component<InputNumberProps, any>
private inputNumberRef: any;
saveInputNumber = (inputNumberRef: any) => {
this.inputNumberRef = inputNumberRef;
};
focus() {
this.inputNumberRef.focus();
}
@ -61,7 +65,7 @@ export default class InputNumber extends React.Component<InputNumberProps, any>
return (
<RcInputNumber
ref={(c: any) => (this.inputNumberRef = c)}
ref={this.saveInputNumber}
className={inputNumberClass}
upHandler={upIcon}
downHandler={downIcon}