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
The NumberInput is the same as TextInput, but the value prop is expected to be PropTypes.number and the type prop allowed values are "number" and "tel". It need not have the logic for using a textarea.
Rationale for why this component is necessary
The TextInput receives and outputs string values. For forms that have you enter numeric values, this means we currently need to transform the values to strings or there are errors. It's best if we don't complicate TextInput too much with number parsing logic, and it's clearer anyway if there is a separate component.
Images / Designs of UI component in context
It should look identical to TextInput. Only the value types are different. Based on "number" or "tel" type, the keyboard on mobile devices will look different, but that is handled automatically by the browser/OS.
Render Criteria
Always render an HTML input. Like the TextInput render function, but without textarea logic.
The text was updated successfully, but these errors were encountered:
NumberInput
Overview / Summary
The
NumberInput
is the same asTextInput
, but thevalue
prop is expected to bePropTypes.number
and thetype
prop allowed values are "number" and "tel". It need not have the logic for using a textarea.Rationale for why this component is necessary
The
TextInput
receives and outputs string values. For forms that have you enter numeric values, this means we currently need to transform the values to strings or there are errors. It's best if we don't complicateTextInput
too much with number parsing logic, and it's clearer anyway if there is a separate component.Images / Designs of UI component in context
It should look identical to TextInput. Only the value types are different. Based on "number" or "tel" type, the keyboard on mobile devices will look different, but that is handled automatically by the browser/OS.
Render Criteria
Always render an HTML
input
. Like the TextInput render function, but without textarea logic.The text was updated successfully, but these errors were encountered: