godon019
2/28/2019 - 8:44 AM

Formik update other values when Field updated

use onChange, values and setFieldValue
exp: when amount changed, get quantity from values and calculate total

<Field type="number" name='amount'
  onChange={(e: any) => {
    const amount = e.target.value
    const quantity = values.quantity;
    setFieldValue('amount', amount, true)
    setFieldValue('total', amount * quantity, true)
  }}
/>