Skip to content

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

@theunreal

Description

@theunreal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions