input-number icon indicating copy to clipboard operation
input-number copied to clipboard

fix(onChange): specify event may triggered with `null`

Open chalkpe opened this issue 3 years ago • 1 comments

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);
...

chalkpe avatar Nov 19 '21 06:11 chalkpe

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

vercel[bot] avatar Nov 19 '21 06:11 vercel[bot]