Closed devops3199 closed 2 weeks ago
The InputNumber component is working properly, which should be an issue with the editor on the official website 🧐
I'm afraid that the issue has arisen in my local.
https://stackblitz.com/edit/react-zbmzv8-ikvn43?file=demo.tsx
Can you provide your example
https://stackblitz.com/edit/react-zbmzv8-pxass1?file=demo.tsx
I added type attribute.
The problem is caused by type="number", removing the type is normal. I will explain this issue in the document later 🧐
https://stackblitz.com/edit/react-zbmzv8-4pcc6d?file=demo.tsx
Even just <Input type="number" />
does not work with changeOnWheel props. As a vanilla html input tag does not allow wheel actions, it's better to take this as a bug.
Vanilla input adds type="number"
mouse wheel events are supported by default in Chrome
Reproduction link
https://ant.design/components/input-number#input-number-demo-change-on-wheel
Steps to reproduce
try the code below.
What is expected?
A wheel action should be ignored when type is number and changeOnWheel is false.
What is actually happening?
A wheel action is still applied when type is number.