chore: change ErrorStateMatcher to use FormControl again #7555
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will fix internal tests that are currently failing because some projects are relying on the
FormControl
signature of the default error state matcher (was recently migrated toNgControl
). Specifically, they were displaying errors in their own format but using our default error state matcher function to determine when they should show them (so the error display aligns with Material).We could change the API of these custom controls to accept
NgControl
instances, but form control directives aren't really intended to be passed around this way in reactive forms. Accepting aFormControl
instance is more idiomatic and convenient.