We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript should allow the parser function to return null or undefined. Sometimes, we want to leave a number field empty and not default to 0.
null
undefined
See the example below:
https://codesandbox.io/s/inputnumber-antd-14150-forked-higgh?file=/index.tsx
Sidenote: <InputNumber<number | undefined> does not work because T extends valueTypes which is number | string
<InputNumber<number | undefined>
number | string
The text was updated successfully, but these errors were encountered:
add @ts-ignore to the parser function 😂 acturally onChange will return null instead undefined even if your parser function return undefined
Sorry, something went wrong.
Agree to this request. Good to know you can just ignore the TS error but would be good to have the TS reflect it.
No branches or pull requests
Typescript should allow the parser function to return
null
orundefined
. Sometimes, we want to leave a number field empty and not default to 0.See the example below:
https://codesandbox.io/s/inputnumber-antd-14150-forked-higgh?file=/index.tsx
Sidenote:
<InputNumber<number | undefined>
does not work because T extends valueTypes which isnumber | string
The text was updated successfully, but these errors were encountered: