[NumberInput] no way to get value from NumberInput if not numeric
See original GitHub issueWhat package(s) are you using?
-
carbon-components
-
carbon-components-react
Detailed description
Describe in detail the issue you’re having.
While chrome prevents NumberInput from receiving a text values, both Firefox and Safari will allow text to be written to input. Without the feature flag flipped there is no way to receive an onChange event or handle this with an error message. This component should log all changes in the onChange handler.
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?
I expect onChange handler to be called anytime the value changes on the NumberInput. Currently onChange is not called when entering in text and if you add a ref the value that is sent back is empty.
What browser are you working in?
Chrome, firefox, and safari
What version of the Carbon Design System are you using?
latest
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
AI PAL
Steps to reproduce the issue
- Open up storybook in Firefox
- Add text to input field.
- There is no error message and no onChange is fired
Please create a reduced test case in CodeSandbox
https://codesandbox.io/s/elegant-lewin-hxhjc?file=/src/index.js
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top GitHub Comments
@joshblack any problems with adding this in? Seems like it would solve an issue for @davidicus and he’s willing to contribute a fix 😃
Is this something that Carbon wants to handle for their consumers? If so I would be happy to contribute a fix.