Question
mapPropsToValues updates the form values only once if enableReinitialize is false. Is this correct behaviour? Should I always set it to true to make mapPropsToValues update form every time?
Also updating props via mapPropsToValues does not run the validation. Is this expected behaviour?
How can I run the validation manually?
Hi @kennyx46 ,
One option I see: in your component you'd need to store reference to <Formik>'s FormikProps that are passed to child FAAC when the FAAC is rendered.
Then on componentWillReceiveProps() or similar, call FormikProps.validateForm();
https://github.com/jaredpalmer/formik#validateform-values-any--void
Let us know if it worked ;-)
Cheers
^^ correct,
there is a PR open for a new onReinitialize prop. Would solve lots of use cases
Most helpful comment
^^ correct,
there is a PR open for a new onReinitialize prop. Would solve lots of use cases