Closed Atralbus closed 4 years ago
hey @Atralbus sorry for the late reply. RHFInput will be moved into the main repo of RHF. This issue should be resolved by that. I will keep you updated when we release it.
I see. Looking forward to it.
@Atralbus we have released V4, try it out with our new Controller component :) and merry xmas
I got
TS2322
error because of the type mismatch withuseForm
. This issue started whenreact-hook-form
madesetValue
typesafe:The signature for
setValue
inuseForm
:The signature for
setValue
inRHFInput
:I thought
RHFInput
could usename
property to define the type of the argument insetValue
, but I'm not sure how it could be handled for the type of thevalue
argument (FormData[Name]). I guess it wouldn't cause a type error if it remains asany
.Is it possible to make
setValue
'sname
argument typesafe? Or do you have a suggestion for handling this type issue without casting or having a lot less type safety?typescript: v3.6.3