Replies: 1 comment 2 replies
-
thanks for the issue report, this is something we can improve later on as this is currently not the scope of the type update. However, happy to hear suggest or ideas on how can we get there. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version Number
7.35.0-next.0
Codesandbox/Expo snack
https://codesandbox.io/s/broken-bash-i01f0y?file=/src/StringListInput.tsx
Steps to reproduce
useController
anduseFormContext
FieldPathByValue
for thename
value
andsetValue
, butvalue
is thenany
, andsetValue
seems confused?Expected behaviour
Given
name
defined asFieldPathByValue<MyFieldValues, string>
:value
coming fromuseController({ name, control })
should be of typestring
(or possiblystring | undefined
, in case of no default?). It's currentlyany
.value
parameter ofsetValue
fromuseFormContext
, should should bestring
, when called with thename
restricted tostring
values.What browsers are you seeing the problem on?
No response
Relevant log output
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions