-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
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
Parser should allow to return null instead of a number #315
Comments
Mathieuu
changed the title
parser prop should allow to return null or undefined
parser should allow to return null instead of a number
Apr 9, 2021
Mathieuu
changed the title
parser should allow to return null instead of a number
Parser should allow to return null instead of a number
Apr 9, 2021
add @ts-ignore to the parser function 😂 |
Agree to this request. Good to know you can just ignore the TS error but would be good to have the TS reflect it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: