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

fix(material/select): float label on focus if there's a placeholder #19517

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented 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 #19514.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jun 2, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jun 2, 2020
@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker labels Jun 2, 2020
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@crisbeto crisbeto force-pushed the 19514/select-floating-label branch 2 times, most recently from ba74a58 to 2a6d2c8 Compare September 29, 2020 18:44
@crisbeto crisbeto changed the title fix(select): float label on focus if there's a placeholder fix(material/select): float label on focus if there's a placeholder 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 crisbeto force-pushed the 19514/select-floating-label branch from 2a6d2c8 to 6c9e594 Compare October 12, 2020 15:20
@mmalerba mmalerba merged commit 7a972fb into angular:master Mar 10, 2021
mmalerba pushed a commit that referenced this pull request 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)
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 11, 2021
…s a placeholder

This is the equivalent of angular#19517 for the MDC-based select.

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`.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 11, 2021
…s a placeholder

This is the equivalent of angular#19517 for the MDC-based select.

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`.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 12, 2021
…s a placeholder

This is the equivalent of angular#19517 for the MDC-based select.

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`.
crisbeto added a commit to crisbeto/material2 that referenced this pull request Mar 21, 2021
…s a placeholder

This is the equivalent of angular#19517 for the MDC-based select.

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`.
andrewseguin pushed a commit that referenced this pull request Mar 23, 2021
…s a placeholder (#22187)

This is the equivalent of #19517 for the MDC-based select.

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`.
@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 Apr 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mat-select placeholder not working.
3 participants