Skip to content

md-select does not display default (null) option text in mat-select-value #6466

Closed
@martin-the-geek

Description

@martin-the-geek

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Select should display text associated with null/undefined value when provided

What is the current behavior?

Select displays nothing

What are the steps to reproduce?

http://plnkr.co/edit/i919jzNOoXhlPeN4hxxE?p=preview

What is the use-case or motivation for changing an existing behavior?

Adding a default option with text for a null value should result in displaying the text when the current model value is null.

For example, adding a default option with text "None"
<md-option>None<md-option>

should show "None" when the select list is closed.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular: 4.3.4
Material: Beta 8

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