Matselect - Cannot read property 'nativeElement' of undefined
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
No error when changing mat-select value
What is the current behavior?
The following error throws when updating mat-select option:
MatSelect.webpackJsonp.../../../material/esm5/select.es5.js.MatSelect._onFadeInDone (select.es5.js:744)
at Object.eval [as handleEvent] (MatSelect.html:1)
at handleEvent (core.js:13254)
at callWithDebugContext (core.js:14739)
at Object.debugHandleEvent [as handleEvent] (core.js:14326)
at dispatchEvent (core.js:9703)
at core.js:10317
at animations.js:348
at Array.forEach (<anonymous>)
at animations.js:346
What are the steps to reproduce?
<mat-form-field>
<mat-select placeholder="packs..." [(ngModel)]="sPack">
<mat-option *ngFor="let pack of packs">{{ pack.name }}</mat-option>
</mat-select>
</mat-form-field>
What is the use-case or motivation for changing an existing behavior?
Bugfix
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular - 5.0.0-rc.3 Material - beta.12 OS - Windows TS - 2.4.2 browsers - all
Is there anything else we should know?
none
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Cannot read property 'native-element' of undefined
I tried in many ways. But I am getting this error. Cannot read property 'nativeElement' of undefined.
Read more >Access Angular Material's MatSelect Options Panel Container
In your directive, inject the reference to MatSelect , subscribe to the openedChange Observable and if it is open, access the panel property...
Read more >angular/material - Gitter
When running my application I get ERROR TypeError: Cannot read property 'nativeElement' of undefined . I have all the dependencies in the ...
Read more >Cannot read property 'nativeElement' of undefined @viewchild ...
Coding example for the question Cannot read property 'nativeElement' of undefined @viewchild-angular.js.
Read more >Cannot read property 'nativeElement' of undefined - Ionic Forum
I am using ArcGIS Map using angular and am getting error to render my HTML Div tag and error is “Cannot read property...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Should be fixed in master by https://github.com/angular/material2/pull/7729.
The new rc for 5 contains the fix:
https://github.com/angular/material2/pull/7729