Skip to content

Conversation

mattwigham
Copy link

Closes #2463

Previously the form helper's onSuccess, onError, onCancel, and onFinish callbacks all set processing = false and progress = null. This PR makes it so that now only happens in onFinish.

Aside from the pedantic and DRY reasons to do this, this also helps those of us using the feature of onSuccess and onError where you can return a promise, and onFinish won't be called until it resolves.

I'm using that feature in some forms that do work in a background job, which I poll the status of inside the promise, and this change allows the form's processing to remain true during that entire time and not just the initial submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useForm processing and progress should only be reset in onFinish

1 participant