-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug]: [NumberInput] Can't enter negative numbers #15985
Comments
I was just looking into an e2e test failure of ours and it was a result of not being able to empty the input to enter a new number. The zero gets in the way, probably not desirable UX. I believe this was introduced with #15739 Thanks |
I discovered myself today that |
@nmgokhale I tested this in the live demo and Storybook. It works in both instances. This issue was likely due to the min value equaling 0. The input allows for negatives when @nmgokhale & @ecrvich The empty input is fixed in my PR (#16100) @2nikhiltom, here's a heads-up that I put up a PR (#16100) for this issue (since you're self-assigned). |
…rop (#15985) (#16100) * fix(NumberInput): allow empty input when allowEmpty = true (#15985) * fix(NumberInput): add @hollyos to contributors (#15985) * refactor(NumberInput): storybook example default min value updated * test(numberinput): update avt test to match default story --------- Co-authored-by: TJ Egan <[email protected]> Co-authored-by: Nikhil Tomar <[email protected]> Co-authored-by: Taylor Jones <[email protected]> Co-authored-by: Taylor Jones <[email protected]>
Package
@carbon/react
Browser
Chrome
Package version
1.53.0
React version
18.2.0
Description
I can't type negative numbers (eg. -1) in the NumberInput field. Also when I want to remove all digits, number input is set to
0
. Even after settingallowEmpty
.Following screen recording from v10 (https://v10.carbondesignsystem.com/components/number-input/code/#live-demo) no longer works in v11 -
Screen.Recording.2024-03-16.at.3.44.20.PM.mov
Reproduction/example
https://react.carbondesignsystem.com/?path=/story/components-numberinput--playground
Steps to reproduce
Please see description
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: