Replies: 1 comment 2 replies
-
Unsure what you exactly need but you can set any value in any path with const { setFieldValue } = useForm();
setFieldValue('someField', 'value');
// set nested paths
setFieldValue('friends[0]', { id: 2, name: 'Steve' });
// or
setFieldValue('friends[1].id', 3); Is that what you are looking for? do you have a more specific example? |
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
-
Lets take something like the following as a response from a graphql endpoint
And I have a selectbox where you can see/select a friend or something like that. Is there a way to use
useField
/useForm
with such data in the form that I can assign a value like${id} - ${name}
as the value?Beta Was this translation helpful? Give feedback.
All reactions