Skip to content

feat(forms): adding event in submit for forms#67696

Open
Wassaf001 wants to merge 2 commits intoangular:mainfrom
Wassaf001:main
Open

feat(forms): adding event in submit for forms#67696
Wassaf001 wants to merge 2 commits intoangular:mainfrom
Wassaf001:main

Conversation

@Wassaf001
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

#67334

Issue Number: 67334

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from AndrewKushnir March 15, 2026 22:15
@google-cla
Copy link

google-cla bot commented Mar 15, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Wassaf001
Copy link
Author

Would this work??

@SkyZeroZx
Copy link
Contributor

Hi, thanks for your contribution

Could you amend the message to something like
feat(forms): adding event in submit for forms to follow the commit message guidelines

Also, please make sure you sign the Google CLA

@Wassaf001 Wassaf001 changed the title adding event in submit for forms feat(forms): adding event in submit for forms Mar 16, 2026
@JeanMeche JeanMeche requested review from leonsenft and removed request for AndrewKushnir March 16, 2026 10:57
@ngbot ngbot bot added this to the Backlog milestone Mar 16, 2026
@Wassaf001
Copy link
Author

I have completed the CLA.

@google-cla google-cla bot added cla: yes and removed cla: no labels Mar 17, 2026
Copy link
Contributor

@leonsenft leonsenft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test that verifies the FormRoot directive correctly forwards the submit event with the corresponding submitter. Let me know if you need assistance at all.

action: (
field: FieldTree<TRootModel & TSubmittedModel>,
detail: {root: FieldTree<TRootModel>; submitted: FieldTree<TSubmittedModel>},
event?: Event,
Copy link
Contributor

@leonsenft leonsenft Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets move the event parameter to a property of the detail parameter.

It should also be a SubmitEvent so that the type exposes the submitter property: https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will do it

Copy link
Contributor

@SkyZeroZx SkyZeroZx Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please run pnpm run public-api:update to update the public api

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently working on it, can you please tell is there any specific step I need to take before running the above command or any doc i can refer to

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/angular/angular/blob/main/contributing-docs/building-and-testing-angular.md

Specifically, you'll need to use a compatible Node version and install the project dependencies/tools:

  1. nvm install or nvm use
  2. pnpm install

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants