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

jaredpalmer picture jaredpalmer  路  3Comments

ancashoria picture ancashoria  路  3Comments

Jungwoo-An picture Jungwoo-An  路  3Comments

PeerHartmann picture PeerHartmann  路  3Comments

pmonty picture pmonty  路  3Comments