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
Is your feature request related to a problem? Please describe.
The type of onChange method (as shown in above image) is any[]. But if I have understood correctly... the value passed as param toonChange will be stored with react-hook-form. Like in above case the value passed to onChange would be stored in the timeZone field of the form. But if type of timeZone is string... shouldn't the onChange also accept only a string as a param? With any[] I am allowed to pass any value to the onChange and it gets stored with react-hook-form... and thus bugs occur at the run-time.
Describe the solution you'd like
To infer the type of param (in onChange) based to the type of "name" prop in the <Controller /> (like type of name="timezone" is defined as string... so onChange should also accept only string values)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The type of
onChange
method (as shown in above image) isany[]
. But if I have understood correctly... the value passed as param toonChange
will be stored with react-hook-form. Like in above case the value passed toonChange
would be stored in thetimeZone
field of the form. But if type oftimeZone
is string... shouldn't theonChange
also accept only a string as a param? Withany[]
I am allowed to pass any value to the onChange and it gets stored with react-hook-form... and thus bugs occur at the run-time.Describe the solution you'd like
To infer the type of param (in onChange) based to the type of "name" prop in the
<Controller />
(like type ofname="timezone"
is defined asstring
... so onChange should also accept onlystring
values)The text was updated successfully, but these errors were encountered: