react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

`form.pauseValidation` is not working

Open michaltk opened this issue 5 years ago • 1 comments

Are you submitting a bug report or a feature request?

Bug

What is the current behavior?

form.pauseValidation is not working. It seems to be that react-final-form is calling form.resumeValidation after the fields are rendered https://github.com/final-form/react-final-form/blob/92cd23e237b43d1dd8e5598381ab58ae8f97f9ed/src/ReactFinalForm.js#L93 since it called form.pauseValidation initially https://github.com/final-form/react-final-form/blob/92cd23e237b43d1dd8e5598381ab58ae8f97f9ed/src/ReactFinalForm.js#L72 but it's disregarding if anyone had called pauseValidation in the meantime.

What is the expected behavior?

Creating a custom form and calling form.pauseValidation should pause the validation.

Sandbox Link

https://codesandbox.io/s/new-star-vcrxo

What's your environment?

react-final-form:6.5.2 final-form:4.20.1

michaltk avatar Dec 02 '20 05:12 michaltk

Is there any update on that topic? I would really appreciate any info since this thing is important in my project :)

jakub-zebrowski avatar Dec 01 '21 08:12 jakub-zebrowski