Describe the problem
After a remote form function is executed, there is no way to know whether we are being redirected. A use case for this is to disable the form after submission. We can use form.pending to disable all the form controls while submitting, but the form controls will then be enabled again while we are being redirected.
Reproduction: https://www.sveltelab.dev/4q5x27lrbyj9y7n?files=.%2Fsrc%2Froutes%2F%2Bpage.svelte%2C.%2Fsrc%2Flib%2Fdata.remote.js
Describe the proposed solution
Some way to know whether we are being redirected. Maybe form.redirecting? Or it could be exposed in the return value of submit in enhance, but I don't think that would work for query and prerender.
Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response
Describe the problem
After a remote form function is executed, there is no way to know whether we are being redirected. A use case for this is to disable the form after submission. We can use
form.pendingto disable all the form controls while submitting, but the form controls will then be enabled again while we are being redirected.Reproduction: https://www.sveltelab.dev/4q5x27lrbyj9y7n?files=.%2Fsrc%2Froutes%2F%2Bpage.svelte%2C.%2Fsrc%2Flib%2Fdata.remote.js
Describe the proposed solution
Some way to know whether we are being redirected. Maybe
form.redirecting? Or it could be exposed in the return value ofsubmitinenhance, but I don't think that would work forqueryandprerender.Alternatives considered
No response
Importance
would make my life easier
Additional Information
No response