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

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

Closed
AkshayBarad opened this issue Jan 3, 2019 · 1 comment · Fixed by #14720
Closed
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@AkshayBarad
Copy link

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

@crisbeto crisbeto self-assigned this Jan 4, 2019
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Jan 4, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Jan 4, 2019
Fixes the state of the form field around a `mat-select` not being updated when the amount of options changes, causing the value to be updated.

Fixes angular#14709.
mmalerba pushed a commit that referenced this issue Jan 4, 2019
Fixes the state of the form field around a `mat-select` not being updated when the amount of options changes, causing the value to be updated.

Fixes #14709.
josephperrott pushed a commit to josephperrott/components that referenced this issue Jan 14, 2019
…ar#14720)

Fixes the state of the form field around a `mat-select` not being updated when the amount of options changes, causing the value to be updated.

Fixes angular#14709.
@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 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants