-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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 not working. #19514
Closed
Labels
area: material/select
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Comments
crisbeto
added
area: material/select
has pr
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
labels
Jun 2, 2020
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Jun 2, 2020
Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes angular#19514.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Sep 28, 2020
Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes angular#19514.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Sep 29, 2020
Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes angular#19514.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Oct 12, 2020
Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes angular#19514.
mmalerba
pushed a commit
that referenced
this issue
Mar 10, 2021
…19517) Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes #19514.
mmalerba
pushed a commit
that referenced
this issue
Mar 10, 2021
…19517) Historically we've only floated the `mat-select` label if a value is selected or the panel is open, because we wouldn't otherwise have anything to show. These changes make it so that we also float it on focus, if there's `placeholder` text that can be shown. This behavior is consistent with `MatInput`. Fixes #19514. (cherry picked from commit 7a972fb)
This was referenced Mar 17, 2021
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area: material/select
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
🐞 bug report
Affected Package
Angular Material 9
Is this a regression?
Not sure.
Description
Using
placeholder
attribute has no effect in mat-select, ifmat-label
is provided also.🔬 Minimal Reproduction
Forked from the mat-select example in the documentation:
https://stackblitz.com/edit/angular-qlpnim-vyfruq?file=src/app/select-overview-example.html
Expected and Actual behavior.
Expected: If provided, the label floats to the top of the field, and the placeholder text can be seen if no value is selected.
Actual: the label acts as a placeholder.
🔥 Exception or Error
--
🌍 Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: