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
For some reason, I can't add TextField props to NumberInput.
Example
Type '{ initialNumber: number; onChangeNumber: (value: NumberInputData) => void; placeholder: string; enableErrors: true; validate: string[]; validationMessage: string[]; showCharCounter: true; maxLength: number; }' is not assignable to type 'IntrinsicAttributes & _NumberInputProps & RefAttributes<TextFieldProps>'.
Property 'placeholder' does not exist on type 'IntrinsicAttributes & _NumberInputProps & RefAttributes<TextFieldProps>'.ts(2322)
The docs indicate NumberInput should support TextField props.
I also see TextFieldProps defined in the type for NumberInput
That was a bug in the docs (now fixed), NumberInput does not actually extend TextField but has a textFieldProps prop where you can send most of the relevant props (the ones you cannot send directly to NumberInput itself).
Description
For some reason, I can't add
TextField
props toNumberInput
.Example
The docs indicate
NumberInput
should supportTextField
props.I also see
TextFieldProps
defined in the type forNumberInput
So not sure why it's not working.
Perhaps related to #2515 RE #2515 (comment)?
Related to
Steps to reproduce
Steps to reproduce the behavior:
NumberInput
placeholder
propExpected behavior
NumberInput
placeholder
prop without errorTextFieldProps
propsActual behavior
See steps to reproduce.
More Info
Code snippet
Environment
Affected platforms
The text was updated successfully, but these errors were encountered: