Skip to content

[legacy-framework] [Page template] Forward submit event from form to parent event handler#695

Merged
flybayer merged 1 commit intocanaryfrom
justin/forward-form-event
Jun 17, 2020
Merged

[legacy-framework] [Page template] Forward submit event from form to parent event handler#695
flybayer merged 1 commit intocanaryfrom
justin/forward-form-event

Conversation

@wKovacs64
Copy link
Collaborator

Closes: N/A

What are the changes and their implications?

This updates the model form component template to forward the submit event from the generated onSubmit event handler to the parent so the parent has access to the event.

I ran into needing the event in the parent while updating the tutorial and rather than document how to do this part, I figured it would be better to just update the template since needing access to the event in the user's onSubmit handler is probably a common scenario.

Checklist

  • Tests added for changes
  • PR submitted to blitzjs.com for any user facing changes

@wKovacs64 wKovacs64 requested a review from aem as a code owner June 16, 2020 16:50
@flybayer
Copy link
Member

Great, thank you!

@flybayer flybayer changed the title Forward submit event from generated form to parent event handler [Page template] Forward submit event from form to parent event handler Jun 17, 2020
@flybayer flybayer merged commit 86c7281 into canary Jun 17, 2020
@flybayer flybayer deleted the justin/forward-form-event branch June 17, 2020 02:13
@itsdillon itsdillon changed the title [Page template] Forward submit event from form to parent event handler [legacy-framework] [Page template] Forward submit event from form to parent event handler Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants