NumberInput's onChange
event does not include the value in event.target.value
when the arrows are used.
#7457
Closed
1 of 2 tasks
Labels
component: number-input
package: react
carbon-components-react
severity: 3
https://ibm.biz/carbon-severity
type: bug 🐛
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
When using the arrows on the
NumberInput
component, theevent
parameter of
onChange
does not contain the actual value inevent.target.value
. Instead, the value is only inevent.imaginaryTarget.value
. However, when typing the number directly in the component, bothevent.target.value
andevent.imaginaryTarget.value
contain the correct number I am typing.Yes,
NumberInput
.I would like to see
event.target.value
contain the correct number when typing directly and also when using the up and down arrows.Firefox and Chrome
carbon-components.react 7.17.0
Steps to reproduce the issue
Instantiate a
NumberInput
, add theonChange={(event) => {...}}
property and print theevent.target.value
. Then use the arrows in the component. The printed value will be sometimes undefined, and sometimes empty string. By typing in the component, the values of the printedevent.target.value
will be the expected ones.Additional information
The text was updated successfully, but these errors were encountered: