Skip to content
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

fix(forms): Make some minor fixups for forward-compatibility with typed forms #44540

Closed
wants to merge 1 commit into from

Conversation

@dylhunn
Copy link
Contributor

@dylhunn dylhunn commented Dec 20, 2021

Make the following fixes:

  • When submitting the entire migration in a disabled state, I commented out more tests than strictly required. It turns out it is possible to set the migration to optional by using a large version number, and then we can run the tests.
  • Responding to some final review comments caused two conditions to become flipped; fix these.
  • Always use explicit checks instead of boolean coercion.
  • Fix one missed any cast in a test case.

Targeting minor because the migration was merged into minor.

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: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@dylhunn dylhunn requested a review from AndrewKushnir Dec 20, 2021
@ngbot ngbot bot added this to the Backlog milestone Dec 20, 2021
@ngbot ngbot bot added this to the Backlog milestone Dec 20, 2021
@dylhunn dylhunn force-pushed the tf-fixup branch 2 times, most recently from 0af4b7b to bf0f433 Dec 20, 2021
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

LGTM (just one minor comment) 👍

@@ -180,7 +180,7 @@ describe('FormArray', () => {
it('should work with nested form groups/arrays', () => {
a = new FormArray([
new FormGroup(
{'c2': new FormControl('v2') as AbstractControl, 'c3': new FormControl('v3')}),
{'c2': new FormControl('v2') as AbstractControl, 'c3': new FormControl('v3') as any}),
Copy link
Contributor

@AndrewKushnir AndrewKushnir Jan 4, 2022

Choose a reason for hiding this comment

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

Should we use AbstractControl instead of any here (like we have it for the c2 form control)?

…ed forms.

Make the following fixes:
* When submitting the entire migration in a disabled state, I commented out more code than strictly required
* Responding to some final review comments caused two conditions to become flipped
* Always use explicit checks instead of boolean corecion
* Fix one missed any cast in a test case
@dylhunn
Copy link
Contributor Author

@dylhunn dylhunn commented Jan 4, 2022

This PR was merged into the repository by commit f7aa937.

@dylhunn dylhunn closed this in f7aa937 Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants