Closed deanfields closed 1 year ago
Hey, @deanfields! Sorry for the delay. We do this for progressive enhancement reasons: while there's no JS available, the user should be able to submit the form and get feedback from the server-side validations.
But if that's not a concern for you, you can make your buttonComponent
derive it's disabled
prop from the form state through useFormState and make it default to disabled.
I'm closing the issue but feel free to reopen it at any time.
When the page is loaded, the button is active, once the validation kicks in the button is disabled. Is there a way to make the button disabled on page load so it doesn't flash when it hydrates and validates the schema client side?