[TypeScript] Override value for TextField
ypresto opened this issue · comments
Yuya Tanaka commented
I have a TextField with its value is number | null
, where null is for empty value.
TextField warns for null
value so I want to convert it to ''
by passing value.
But currently TextField
type is
export interface TextFieldProps extends FieldProps, Omit<MuiTextFieldProps, 'name' | 'value' | 'error'> {
So type check fails when value
prop is passed, while it works well for runtime.
Can I remove "omit name
" from the type declaration?
Ciaran Liedeman commented
This should be solved with initialValues