Skip to content

bug(md-select): options not sized correctly if no placeholder set #3244

Closed

Description

@macjohnny

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When using a md-select without the placeholder attribute, the options shown should be the same width as the md-select element.

What is the current behavior?

The options are at a smaller width than the md-select attribute, since the _triggerWidth property is only set when the placeholder attribute is set, which is done in https://github.com/angular/material2/blob/master/src/lib/select/select.ts#L217

bildschirmfoto 2017-02-22 um 18 41 34

What are the steps to reproduce?

http://embed.plnkr.co/U9jHgw/

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

@angular/material: 2.0.0-beta.2
Google Chrome Version 56.0.2924.87 (64-bit)

Activity

  1. macjohnny commented on Feb 22, 2017

    @macjohnny
    ContributorAuthor

    a workaround is setting the placeholder attribute to a space, i.e. placeholder=" "

  2. added
    P3
    on Feb 22, 2017
  3. added a commit that references this issue on Feb 22, 2017
    2641405
  4. added 2 commits that reference this issue on Mar 16, 2017
    6169356
    17f7e82
  5. added a commit that references this issue on Mar 30, 2017
    055111c
  6. added a commit that references this issue on Apr 11, 2017
    eaf16c8
  7. added a commit that references this issue on Apr 16, 2017
    ac476e4
  8. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions