Formik: How to update values from a FieldArray onChange

Created on 26 Nov 2018  路  3Comments  路  Source: formium/formik

鉂換uestion

I'm wondering how to update values when using a FieldArray. I have the values coming through, but how to I make onChange work?

Thank you.

Question

Most helpful comment

You should use setFieldValue.

All 3 comments

same here...
example project: https://codesandbox.io/s/ox047lvn4y

You should probably set the value using setFieldValue when using custom fields so in @Evanion's case: form.setFieldValue(field.name, value).

You should use setFieldValue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jucesr picture Jucesr  路  3Comments

giulioambrogi picture giulioambrogi  路  3Comments

green-pickle picture green-pickle  路  3Comments

jaredpalmer picture jaredpalmer  路  3Comments

jonathonwpowell picture jonathonwpowell  路  3Comments