-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Description
Which @angular/* package(s) are relevant/related to the feature request?
forms
Description
It would be nice if the function FormSubmitOptions.action, which defines what to do when a signal forms is submitted, could have access to the SubmitEvent that triggered the call to this function.
It would allow accessing the submitter of the event, allowing to know which button was used to submit the form, which is very useful when a form has two submit buttons (like "Send" and "Send later" for example, or "Save" and "Save as draft").
Proposed solution
Add a third argument event: SubmitEvent to the action function of FormSubmitOptions
Alternatives considered
Handle the submission using a (submit)="save($event)" event binding on the form, in order to receive the event, and then delegate to the submit function, without relying on the FormRoot directive and on the form's submission action.
Metadata
Metadata
Assignees
Type
Projects
Status