-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[MdInput] Cannot read property 'invalid' of null #7419
Comments
It looks like @simpulton FWIW, you can provide a custom error matcher locally or globally as a workaround. |
Hi There, If I start deleting from the end of a FormArray with
I have MdInput attached to FormArray->FormGroup->element |
Making the change above, fixed my issue as well.
|
* Allows for the select's error state matcher to be overwritten through an `@Input`. * Switches `MatSelect` over to use the same global provider for its error state as `MatInput`. **Note:** This is a resubmit of angular#6147 that works with our latest setup and excludes a few changes. Fixes angular#7419.
* Allows for the select's error state matcher to be overwritten through an `@Input`. * Switches `MatSelect` over to use the same global provider for its error state as `MatInput`. **Note:** This is a resubmit of angular#6147 that works with our latest setup and excludes a few changes. Fixes angular#7419.
* Allows for the select's error state matcher to be overwritten through an `@Input`. * Switches `MatSelect` over to use the same global provider for its error state as `MatInput`. **Note:** This is a resubmit of angular#6147 that works with our latest setup and excludes a few changes. Fixes angular#7419.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
We are using dynamically generating forms for a line of business application and when we added in Angular Material the form elements would throw an error when being added to the page.
The error is as follows
We were able to fix it by changing the
defaultErrorStateMatcher
method inmaterial.es5.js
to also check for the presence ofcontrol
before performing additional verifications.What is the current behavior?
The error above is thrown.
What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on
@master
): https://goo.gl/DlHd6UStackBlitz starter (using latest
npm
release): https://goo.gl/wwnhMVWhat is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Our versions are as follows
and
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: