reform
reform copied to clipboard
"Submitting" form state is replaced with "Valid" straight away
I've just noticed that #218 introduced a line that sends a SetFormState(Valid) action immediately after sending the Submit action. Not sure what the purpose of the change is but it results in no Submitting state. I noticed it because I disable the submit button on submit and it's no longer being disabled. If I log formState on render it stays Valid up until the form is successfully submitted. Is this intentional?
https://github.com/rescriptbr/reform/blob/6c8d6de710896a5f35daf91ab5ea6d7b3801f9f4/reform/src/ReForm.res#L253
Hey @alexeygolev thanks for reporting. It's not intentional and i'ts probably a bug. I'll test the behavior and ping you with a better explanation for this issue. cc @fakenickels
And sorry for the delay, it has been a busy month.
Hey thanks for bringing this up. It definitively sounds like a bug
It should put the form in Valid state then Submitting. I took a quick look in the code and not sure what can be causing it to not be working normally