-
Notifications
You must be signed in to change notification settings - Fork 83
<TextField type='number' /> has string value #224
Comments
@Florian-Schoenherr @TheComputerM how would you feel about my creating a component
|
I think there's already an One question: |
Yes -- but the only two non-string value types are the You are right that we could handle numeric coercion manually in these cases, though because of the built-in validation that's available on number types, and the different properties they accept, I still think the right move is to have a separate |
I think we should have separate components, yes.
if it's really only those 2 types, we can use Rich's suggestion, maybe even slightly advanced. The reaction to type is not needed if we don't expose Do people not use |
Because the
type
prop must be static when using two-wayvalue
binding (per Rich Harris's answer on StackOverflow), even when we set thetype='number'
on a<TextField />
the value binding remains to a string.in PR #193 I proposed a new component for this, but this posed issues around duplication of styles. I'm opening this issue as a discussion place for a possible implementation.
The text was updated successfully, but these errors were encountered: