Skip to content

Mat Select placeholder/label disappears when options programatically set to [] #14709

Closed
@AkshayBarad

Description

@AkshayBarad

What is the expected behavior?

Placeholder/label should continue to be shown.

What is the current behavior?

Have the select control's value be one amongst the <option>s
Programmatically, remove options; don't touch value
placeholder/label disappears

Example Link

StackBlitz: https://stackblitz.com/edit/angular-mat-select-no-label
Click button "Set Select Options to []"

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

Angular:7.0.3
Material:7.0.2
OS:Mac
TypeScript:3.1.3
Browsers: chrome

Akshay Barad
BitCraft

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions