0
votes

Selecting a checkbox, triggers an api call that updates validation rules for other form fields. A similar question has been asked where form values drive validation but in mine, it's external data that's driving revalidation.

I've included a modified sandbox to the original solution you provided but final-form doesn't react to the validation change so the form is always a render behind.

Updated sandbox: https://codesandbox.io/s/react-final-form-synchronous-record-level-validation-example-rcg7q

Original question: React-final-form ignores Field validate property change

1

1 Answers

1
votes

My problem was that I was trying to use React's state as the source of truth. Instead, I used Final Form by updating the initialState as the example, "Load, Save, and Reinitialize" shows and updated the initialState to include what was original stored only in state.