Skip to content
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

Matselect - Cannot read property 'nativeElement' of undefined #7959

Closed
theunreal opened this issue Oct 22, 2017 · 11 comments
Closed

Matselect - Cannot read property 'nativeElement' of undefined #7959

theunreal opened this issue Oct 22, 2017 · 11 comments

Comments

@theunreal
Copy link

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

@crisbeto
Copy link
Member

Should be fixed in master by #7729.

@KthProg
Copy link

KthProg commented Nov 15, 2017

Is this in a new version that I can pull down? I'm having this issue right now as well.

@crisbeto
Copy link
Member

5.0.0-rc.0 includes the fix @KthProg.

@KthProg
Copy link

KthProg commented Nov 15, 2017

Thank you kind sir.

@alan345
Copy link

alan345 commented Nov 23, 2017

The new rc for 5 contains the fix:

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

#7729

@costea93
Copy link

costea93 commented Dec 4, 2017

I updated the material and cdk to 5.0.0-rc0 version but the problem it's still reproducible in my case

@j-tee
Copy link

j-tee commented Dec 28, 2017

Having the same issue here with 5.0.0-rc.3

@dreddstev
Copy link

Issue fixed for me by updating material and cdk to 5.0.2

@costea93
Copy link

"@angular/animations": "^5.2.5", "@angular/cdk": "^5.2.1", "@angular/common": "^5.2.5", "@angular/compiler": "^5.2.5", "@angular/core": "^5.2.5", "@angular/forms": "^5.2.5", "@angular/http": "^5.2.5", "@angular/material": "^5.2.1", "@angular/platform-browser": "^5.2.5", "@angular/platform-browser-dynamic": "^5.2.5", "@angular/router": "^5.2.5"

The issue it's still reproducible for me :(

@SalsabeelNasr
Copy link

SalsabeelNasr commented Mar 31, 2018

me too
@crisbeto
"@angular/animations": "^5.2.9",
"@angular/cdk": "^5.2.4",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^5.2.4",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.9",
"@types/materialize-css": "^1.0.1",
"angular2-materialize": "^15.1.10",
"core-js": "^2.5.4",
"jquery": "^3.3.1",
"materialize-css": "^0.100.2",
"mdi": "^2.1.19",
"ng2-material-import": "^1.1.10",
"rxjs": "^5.5.8",
"zone": "^0.3.4",
"zone.js": "^0.8.21"

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants