-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
GThis is is related to a Google internal issueThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/stepperformsThis issue is related to Angular Forms integrationThis issue is related to Angular Forms integration
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
I'm going through the process of activating strict template typechecking.
Our legacy code sends FormControlGroup instances into isErrorState. Unfortunately, the compiler won't accept a FormControlGroup instance for an UntypedFormControl.
However, the underlying ErrorStateMatcher accepts AbstractControl. And everything has seemed fine (for years) with passing a group here.
As a secondary item, it would be great if methods that take " | null " as part of their parameter types would also allow those params to be optional?
Thanks!
Reproduction
Steps to reproduce:
- Pass a FormControlGroup instance as the first param to MatStep.isErrorState()
Expected Behavior
Compiler happily accepts FormControlGroup.
Actual Behavior
Compiler complains that FormControlGroup doesn't match UntypedFormControl.
Environment
- Angular:
- CDK/Material:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):
Metadata
Metadata
Assignees
Labels
GThis is is related to a Google internal issueThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/stepperformsThis issue is related to Angular Forms integrationThis issue is related to Angular Forms integration