How to async load defaultValues from a global state?
However, i dont want to block the rendering of the form with a loading or a spinner, so i am doing this:
This works (even though i don't know if the recommended approach).
However, due to this form.validate(), all non-optional fields with null values shows the error, even tough error content has been guarded by the "field.state.meta.isTouched && !field.state.meta.isValid".
Is this an intended approach? Apparently setFieldValue marks fields touched by default.
Ps: i know setFieldValue has a dontUpdateMeta opt prop, but this seems to not only not marking isTouched: true but also would make form.validate('change') to have no effect.
This seems a much trivial usecase but I am might have not yet found an elegant way to handle it. Appreciate if anyone can shine some light!