Skip to content

How to use setFieldValue with nested objects? #3681

Answered by logaretm
alex3025 asked this question in Q&A
Discussion options

You must be logged in to vote

Have you tried:

setFieldValue('branding.name', 'new val');

This should work as long the field is creating using useField or as long your InputField component calls it with its name/id. Feel free to provide a sample on codesandbox or stackblitz and I will take a look.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@alex3025
Comment options

@logaretm
Comment options

Answer selected by alex3025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants