Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(forms): add ability to clear a FormRecord #50750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

EmmanuelRoux
Copy link
Contributor

@EmmanuelRoux EmmanuelRoux commented Jun 17, 2023

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.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: fixes #50748 and #50751

What is the new behavior?

New method FormRecord.clearControls() is available.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from dylhunn June 17, 2023 18:23
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jun 17, 2023
@EmmanuelRoux EmmanuelRoux force-pushed the formrecord-clear branch 3 times, most recently from ce2375e to 54abda7 Compare June 17, 2023 19:07
@EmmanuelRoux
Copy link
Contributor Author

EmmanuelRoux commented Jun 17, 2023

This PR needs #50752 to be fixed first (tests will fail otherwise).

#50752 merged with this PR

@JeanMeche JeanMeche added state: blocked area: forms forms: Controls API Issues related to AbstractControl, FormControl, FormGroup, FormArray. labels Jun 17, 2023
@ngbot ngbot bot added this to the Backlog milestone Jun 17, 2023
@EmmanuelRoux
Copy link
Contributor Author

Any update on this PR please ?

@lazarljubenovic
Copy link
Contributor

What's blocking this?

@JeanMeche JeanMeche force-pushed the formrecord-clear branch 5 times, most recently from 5ec23e9 to 656e5b0 Compare May 17, 2024 19:16
@JeanMeche
Copy link
Member

Let me help to see where we can go with this change.

Copy link
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

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

Preliminary tests against the Google codebase came back green.

@dylhunn
Copy link
Contributor

dylhunn commented May 28, 2024

Running a TGP (googler link).

@dylhunn
Copy link
Contributor

dylhunn commented May 28, 2024

@EmmanuelRoux Would you mind rebasing this on main?

@angular-robot angular-robot bot removed the detected: feature PR contains a feature commit label May 28, 2024
@EmmanuelRoux
Copy link
Contributor Author

@dylhunn done 👍

AndrewKushnir pushed a commit that referenced this pull request Oct 22, 2024
Add unit test for statusChange events

PR Close #50750
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request Oct 22, 2024
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request Oct 22, 2024
AndrewKushnir added a commit to AndrewKushnir/angular that referenced this pull request Oct 22, 2024
AndrewKushnir added a commit that referenced this pull request Oct 22, 2024
AndrewKushnir added a commit that referenced this pull request Oct 22, 2024
AndrewKushnir added a commit that referenced this pull request Oct 22, 2024
@AndrewKushnir
Copy link
Contributor

FYI, reopening this PR due to a breakage in Google's codebase (typing-related). Reverted via #58315, the change will need a global presubmit (TGP).

Next step is for the Angular team to run TGP and investigate failures.

@AndrewKushnir AndrewKushnir reopened this Oct 22, 2024
@AndrewKushnir AndrewKushnir added state: blocked action: global presubmit The PR is in need of a google3 global presubmit and removed action: merge The PR is ready for merge by the caretaker labels Oct 22, 2024
@Nallebeorn
Copy link

The changelog mentions this new function (https://github.com/angular/angular/blob/main/CHANGELOG.md#forms-1) for v19.0.0

There's no mention in the changelog of it being reverted so this is a bit misleading, and it's unclear which versions (if any) shipped with it before being reverted.

@JeanMeche
Copy link
Member

@Nallebeorn The feature was indeed un-shipped, we'll update the changelog.

@JeanMeche JeanMeche closed this Mar 28, 2025
@angular-robot angular-robot bot removed the detected: feature PR contains a feature commit label Mar 28, 2025
@JeanMeche
Copy link
Member

JeanMeche commented Mar 28, 2025

The rebase didn't go as expected, can you cherry pick your 3 commits (visible here https://github.com/EmmanuelRoux/angular/commits/7c707ed6f5) so we can reopen the PR.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: global presubmit The PR is in need of a google3 global presubmit area: forms forms: Controls API Issues related to AbstractControl, FormControl, FormGroup, FormArray. state: blocked target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add .clear() to remove all member controls of FormGroup|FormRecord
8 participants