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

NumberInput: uncontrolled NumperInput not respecting defaultValue #7299

Closed
1 of 2 tasks
ashharrison90 opened this issue Nov 17, 2020 · 0 comments · Fixed by #7312
Closed
1 of 2 tasks

NumberInput: uncontrolled NumperInput not respecting defaultValue #7299

ashharrison90 opened this issue Nov 17, 2020 · 0 comments · Fixed by #7312

Comments

@ashharrison90
Copy link
Contributor

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

Describe in detail the issue you're having.

  • Using NumberInput as an uncontrolled component with defaultValue does not set the defaultValue correctly, and throws a warning in the console about using both value and defaultValue simultaneously

Is this issue related to a specific component?

  • NumberInput

What did you expect to happen? What happened instead? What would you like to
see changed?

  • expected it to display the defaultValue correctly
  • expected it to not throw a warning in the console about having value and defaultValue set simultaneously

What browser are you working in?

  • chrome 86.0.4240.198

What version of the Carbon Design System are you using?

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

  • IBM App Connect

Steps to reproduce the issue

  1. Use NumberInput with a defaultValue

Please create a reduced test case in CodeSandbox

Additional information

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants