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
{{ message }}
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.
However, I am receiving the warning that Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?.
The fix is to pass a ref to InputRef when rendering TextInput.
However, due to the typing in useTypedController, I get the typing error Property 'ref' does not exist on type '{ onChange: (...event: any[]) => void; onBlur: () => void; value: string | number | undefined; }'.
Will there be any issues with passing ref as well in the render for TypedController?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Under
useTypedController.d.ts
:Only onChange, onBlur, and value are allowed to be passed as props
The issue comes due to the issue: react-hook-form/react-hook-form#3411
I am attempting to render MUI TextInput in TypedController.
However, I am receiving the warning that
Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
.The fix is to pass a ref to InputRef when rendering TextInput.
However, due to the typing in
useTypedController
, I get the typing errorProperty 'ref' does not exist on type '{ onChange: (...event: any[]) => void; onBlur: () => void; value: string | number | undefined; }'
.Will there be any issues with passing ref as well in the render for TypedController?
The text was updated successfully, but these errors were encountered: