Expose submitter to use:enhance SubmitFunction parameter #9414
Labels
feature / enhancement
New feature or request
forms
Stuff relating to forms and form actions
low hanging fruit
ready to implement
please submit PRs for these issues!
Milestone
Describe the problem
Currently it's a bit difficult to manage the submission status of (multiple) forms and do things like disabling the submit button and apply a CSS class while the form is loading. There already is an issue going a bit into this. In the meantime a simple non-breaking change to the
enhance
action could already help.Describe the proposed solution
It would be nice if the
enhance
form action would expose thesubmitter
of the submit event. This would allow us to do things like the following without having to create multipleloading
variables and/or wrap the list item/form in a separate component.Currently we can of course use
form.querySelector('button')
but this just adds a bit more code and wouldn't work with multiple submit buttons.Alternatives considered
No response
Importance
nice to have
Additional Information
No response
The text was updated successfully, but these errors were encountered: