Expected behaviour:
isSubmitting should remain true while the front end is waiting for the server to respond
Encountered behaviour:
isSubmitting becomes true, then immediately becomes false before server responds, formState gets set to "success"
How to reproduce:
See src/modals/email-signup.js in the inputcowork-html project.
(This modal can be opened by navigating to http://localhost:3000/membership and clikcing the Join the Community button)
Set a breakpoint in apps/cowork/views.py on the return of the function email_list_signup in the cowork-api project (so that in theory, isSubmitting should get stuck as true)
Open node_modules/@app-elements/use-form/dist/use-form.m.js
add a debugging statement to line 43 as follows:
Expected behaviour: isSubmitting should remain true while the front end is waiting for the server to respond
Encountered behaviour: isSubmitting becomes true, then immediately becomes false before server responds, formState gets set to "success"
How to reproduce: See src/modals/email-signup.js in the inputcowork-html project. (This modal can be opened by navigating to http://localhost:3000/membership and clikcing the Join the Community button)
Set a breakpoint in apps/cowork/views.py on the return of the function email_list_signup in the cowork-api project (so that in theory, isSubmitting should get stuck as true)
Open node_modules/@app-elements/use-form/dist/use-form.m.js add a debugging statement to line 43 as follows:
Notice that this indicates that formState is being set to success before the server processes the request.
also add this line to just above the return statement of the mentioned modal component:
isSubmitting will briefly flash as true, then will immediately become false again. The spinner on the button is never displayed.