Skip to content
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 : Unable to clear number input textboxes they are defaulted to 0 #16016

Closed
2 tasks done
marinamas opened this issue Mar 20, 2024 · 2 comments · Fixed by #16100
Closed
2 tasks done

Comments

@marinamas
Copy link

Package

@carbon/react

Browser

Chrome, Safari

Package version

"@carbon/react": "1.53.0",

React version

"react": "17.0.2",

Description

  • Render the NumperInput component from carbon/react.
  • By default, 0 is been assigned to the field.
  • Try to clear and add a new value . This would not clear the value 0 instead append the newly added value to 0.
  • Though allowEmpty prop is been set to true. The NumberInput field is never cleared.

Reproduction/example

https://codesandbox.io/p/sandbox/numberinput-9587cm?file=%2Fsrc%2FApp.js%3A7%2C41

Steps to reproduce

Render the NumperInput component from carbon/react.

  • By default, 0 is been assigned to the field.
  • Try to clear and add a new value . This would not clear the value 0 instead append the newly added value to 0.
  • Though allowEmpty prop is been set to true. The NumberInput field is never cleared.

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@ecrvich
Copy link

ecrvich commented Mar 20, 2024

See also #15985 which basically covers the same problem.

@tw15egan
Copy link
Collaborator

CLosing as a dupe of #15985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants