Replies: 1 comment
-
i'm also facing a similar issue and came across #4694 from 2021 that doesn't seem to help much the easiest workaround seems to just be to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi :)
I am trying to wrap the
setValue
function exposed byuseFormContext
to only set a value under certain conditions, but can't seem to get the typing correct.Sandbox
My use case looks something like this:
I am however unable to call
setValue
like this, due to:TS2345: Argument of type
NonNullable<FormFields[K]>
is not assignable to parameter of typeI am using TS 4.9.5 and react-hook-form 7.43.3
Any insight would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions