You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As seen in the screenshots, I'm using the FormControl tag which is using an InputNumber accepter which should store the values I input as numbers, but instead, is stored as string. When the callback onChange is called in the form <Form onChange={callback} ...> the value of this field (i.e this FormControl) returns a string instead of a number.
Expected Behavior
The value for each FormControl should be stored with the most representative javascript type. So, if my FormControl has an InputNumber accepter, I would expect that the value stored is a number, not a string.
To Reproduce
I'll later update this issue including how to reproduce it
Screenshots
The text was updated successfully, but these errors were encountered:
If it returns a number, InputNumber will not be able to support decimals.
For example, if we need to manually enter 1.5, the onChange event will be triggered every time the input is made. When the string 1. is entered, it is forced to be a number, and 1. becomes 1.
So we hope you can customize the processing data type in the onChange callback of InputNumber.
What version of rsuite are you using?
4.10.2
What version of React are you using?
17.0.2
What browser are you using?
Chrome
Describe the Bug
As seen in the screenshots, I'm using the
FormControl
tag which is using anInputNumber
accepter which should store the values I input as numbers, but instead, is stored as string. When the callbackonChange
is called in the form<Form onChange={callback} ...>
the value of this field (i.e this FormControl) returns a string instead of a number.Expected Behavior
The value for each FormControl should be stored with the most representative javascript type. So, if my FormControl has an InputNumber accepter, I would expect that the value stored is a number, not a string.
To Reproduce
I'll later update this issue including how to reproduce it
Screenshots
The text was updated successfully, but these errors were encountered: