-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Select component cannot be used in TypeScript applications [Workaround Found] #5
Comments
I have a similar probelm :
package versions :
alt the workaround above worked for me as well I tried to fix the problem. I changed the
So tried to check if it is ok in the original file. I did the same in
|
Seems to be the Author doesnt want to add the solution to the project :( |
@nikonov91-dev https://github.com/lookfirst/mui-rff |
Type error: Type 'FunctionComponent' is not assignable to type 'string | ComponentClass<FieldRenderProps, any> | FunctionComponent | undefined'.
Type 'FunctionComponent' is not assignable to type 'FunctionComponent'.
Types of parameters 'props' and 'props' are incompatible.
Type 'FieldRenderProps & { children?: ReactNode; }' is not assignable to type 'FormHelperTextWrapperProps & { children?: ReactNode; }'.
Type 'FieldRenderProps & { children?: ReactNode; }' is missing the following properties from type 'FormHelperTextWrapperProps': label, formControlProps TS2322
141 | <div>
142 | <label>City </label>
143 | <Field name="city" label="Select city" component={FFMUI.Select}>
Up arrow pointing to the word component:
144 | <MenuItem value="London">London </MenuItem>
145 | <MenuItem value="Paris">Paris </MenuItem>
146 | </Field>
I've just found an easy workaround: type-cast the Select to any when assigned to the component prop:
component={FFMUI.Select as any}
The text was updated successfully, but these errors were encountered: