Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

@Splaktar
Copy link
Contributor

PR Checklist

Please check your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

  • floating label is not displayed when placeholder is specified and no selection has been made in a md-input-container

Fixes #10116

What is the new behavior?

  • don't hide the floating label in an md-input-container with a md-select
    that has a placeholder attribute specified

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Given the following:

        <md-input-container>
          <label>State</label>
          <md-select placeholder="Please select" ng-model="ctrl.userState">
            <md-option><em>None</em></md-option>
            <md-option ng-repeat="state in ctrl.states" ng-value="state.abbrev">
              {{state.abbrev}}
            </md-option>
          </md-select>
        </md-input-container>

Before

Screen Shot 2020-12-16 at 00 23 24

After

Screen Shot 2020-12-16 at 00 23 34

- don't hide the floating `label` in an `md-input-container` with a `md-select`
  that has a `placeholder` attribute specified

Fixes #10116
@Splaktar Splaktar added this to the 1.2.2 milestone Dec 16, 2020
@Splaktar Splaktar self-assigned this Dec 16, 2020
@google-cla google-cla bot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Dec 16, 2020
@Splaktar Splaktar added P2: required Issues that must be fixed. type: bug ux: integration pr: merge ready This PR is ready for a caretaker to review labels Dec 16, 2020
@Splaktar Splaktar requested a review from mmalerba December 16, 2020 05:39
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Dec 16, 2020
@Splaktar Splaktar merged commit 3ea5630 into master Dec 16, 2020
@Splaktar Splaktar deleted the select-fix-hidden-floating-label branch December 16, 2020 21:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug ux: integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

input-container(select): label is not displayed when placeholder is specified and no selection has been made

2 participants