Skip to content

Commit

Permalink
chore: bump rc-input to v1.4.0 (#611)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadCcc authored Dec 15, 2023
1 parent 3085227 commit 0a0926e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@babel/runtime": "^7.10.1",
"@rc-component/mini-decimal": "^1.0.1",
"classnames": "^2.2.5",
"rc-input": "~1.3.5",
"rc-input": "~1.4.0",
"rc-util": "^5.28.0"
},
"devDependencies": {
Expand Down
23 changes: 11 additions & 12 deletions src/InputNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ const InternalInputNumber = React.forwardRef(
const onWheel = (event) => {
if (wheel === false) {
return;
};
}
// moving mouse wheel rises wheel event with deltaY < 0
// scroll value grows from top to bottom, as screen Y coordinate
onInternalStep(event.deltaY < 0);
Expand All @@ -536,7 +536,7 @@ const InternalInputNumber = React.forwardRef(
// https://stackoverflow.com/questions/63663025/react-onwheel-handler-cant-preventdefault-because-its-a-passive-event-listenev
input.addEventListener('wheel', onWheel);
return () => input.removeEventListener('wheel', onWheel);
};
}
}, [onInternalStep]);

// >>> Focus & Blur
Expand Down Expand Up @@ -660,15 +660,6 @@ const InputNumber = React.forwardRef(

return (
<BaseInput
inputElement={
<InternalInputNumber
prefixCls={prefixCls}
disabled={disabled}
classNames={classNames}
ref={composeRef(inputFocusRef, ref)}
{...rest}
/>
}
className={className}
triggerFocus={focus}
prefixCls={prefixCls}
Expand All @@ -687,7 +678,15 @@ const InputNumber = React.forwardRef(
wrapper: 'div',
groupAddon: 'div',
}}
/>
>
<InternalInputNumber
prefixCls={prefixCls}
disabled={disabled}
classNames={classNames}
ref={composeRef(inputFocusRef, ref)}
{...rest}
/>
</BaseInput>
);
},
) as (<T extends ValueType = ValueType>(
Expand Down

0 comments on commit 0a0926e

Please sign in to comment.