input-number
input-number copied to clipboard
fix(onChange): specify event may triggered with `null`
onChange
is triggered with null
sometimes, but type of value
is just ValueType
(string | number
) for now.
However making this change is likely going to be a breaking change; it's more confusing null
is given without any notice.
references
- https://github.com/react-component/input-number/blob/7440f52f3305632eda5fc20e1302ddacc7ec50ac/src/InputNumber.tsx#L294
- #316
...
expect(onChange).toHaveBeenCalledWith(null);
...
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/react-component/input-number/3npR9wzGX31HJtD9rgMbaxWaQsAE
✅ Preview: Failed