reform icon indicating copy to clipboard operation
reform copied to clipboard

"Submitting" form state is replaced with "Valid" straight away

Open alexeygolev opened this issue 3 years ago • 4 comments

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

alexeygolev avatar May 17 '22 09:05 alexeygolev

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

vmarcosp avatar Jul 01 '22 02:07 vmarcosp

And sorry for the delay, it has been a busy month.

vmarcosp avatar Jul 01 '22 02:07 vmarcosp

Hey thanks for bringing this up. It definitively sounds like a bug

fakenickels avatar Jul 04 '22 17:07 fakenickels

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

fakenickels avatar Jul 04 '22 17:07 fakenickels