Skip to content

Commit 0a0926e

Browse files
authored
chore: bump rc-input to v1.4.0 (#611)
1 parent 3085227 commit 0a0926e

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@babel/runtime": "^7.10.1",
5050
"@rc-component/mini-decimal": "^1.0.1",
5151
"classnames": "^2.2.5",
52-
"rc-input": "~1.3.5",
52+
"rc-input": "~1.4.0",
5353
"rc-util": "^5.28.0"
5454
},
5555
"devDependencies": {

src/InputNumber.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ const InternalInputNumber = React.forwardRef(
523523
const onWheel = (event) => {
524524
if (wheel === false) {
525525
return;
526-
};
526+
}
527527
// moving mouse wheel rises wheel event with deltaY < 0
528528
// scroll value grows from top to bottom, as screen Y coordinate
529529
onInternalStep(event.deltaY < 0);
@@ -536,7 +536,7 @@ const InternalInputNumber = React.forwardRef(
536536
// https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev
537537
input.addEventListener('wheel', onWheel);
538538
return () => input.removeEventListener('wheel', onWheel);
539-
};
539+
}
540540
}, [onInternalStep]);
541541

542542
// >>> Focus & Blur
@@ -660,15 +660,6 @@ const InputNumber = React.forwardRef(
660660

661661
return (
662662
<BaseInput
663-
inputElement={
664-
<InternalInputNumber
665-
prefixCls={prefixCls}
666-
disabled={disabled}
667-
classNames={classNames}
668-
ref={composeRef(inputFocusRef, ref)}
669-
{...rest}
670-
/>
671-
}
672663
className={className}
673664
triggerFocus={focus}
674665
prefixCls={prefixCls}
@@ -687,7 +678,15 @@ const InputNumber = React.forwardRef(
687678
wrapper: 'div',
688679
groupAddon: 'div',
689680
}}
690-
/>
681+
>
682+
<InternalInputNumber
683+
prefixCls={prefixCls}
684+
disabled={disabled}
685+
classNames={classNames}
686+
ref={composeRef(inputFocusRef, ref)}
687+
{...rest}
688+
/>
689+
</BaseInput>
691690
);
692691
},
693692
) as (<T extends ValueType = ValueType>(

0 commit comments

Comments
 (0)