question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Matselect - Cannot read property 'nativeElement' of undefined

See original GitHub issue

Bug, 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
crisbetocommented, Oct 22, 2017

Should be fixed in master by https://github.com/angular/material2/pull/7729.

2reactions
alan345commented, Nov 23, 2017

The new rc for 5 contains the fix:

"@angular/material": "^5.0.0-rc0",
"@angular/cdk": "^5.0.0-rc0",

https://github.com/angular/material2/pull/7729

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found