Skip to content

md-option allow multiple lines #3883

Closed
Closed

Description

@fxck

It would be nice if it was possible to add more lines to a select option, similar to what you can do in md-list-item with md-line, currently the height is fixed to 48px (which I guess is because of the positioning to the active option upon opening) and width is capped at about 300px, so it's hard to give the option some secondary context which helps identifying the correct option you want to select

image

also md-option-image could be handy

cc @kara @crisbeto

Activity

  1. crisbeto commented on Apr 4, 2017

    @crisbeto
    Member
    1. I'm not sure whether the spec allows for multi-line options.
    2. As you mentioned, this makes the positioning a bit harder.
  2. fxck commented on Apr 4, 2017

    @fxck
    ContributorAuthor

    It might be the case, that the spec does not allow it, but then again, I don't think spec mentions anything about capping max width at 300px either.
    And I also think it's a fair use case no matter what spec says. So how about this, if the spec doesn't allow multi-line, it should still be possible for the consumer to modify the behavior to some extent (as is the case where you override some css property), which is currently not possible with md-option, because some of the values are hardwired into javascript, since the height doesn't really need to be dynamic, all this would really require is the ability to modify the height used for calculations with an [input], wdyt @crisbeto?

  3. willshowell commented on Apr 4, 2017

    @willshowell
    Contributor

    From the spec on simple menus (afaik there is no spec for select?):

    • Do: Use a simple dialog if any text in a simple menu wraps to a second line.
    • Don't: Don’t truncate text in a simple menu. Use a simple dialog instead.

    So it appears that both truncating options and multi-line options are wrong? That said, it also appears that panel width shouldn't be capped around 300px

    screen shot 2017-04-04 at 10 18 48 am

  4. fxck commented on Apr 4, 2017

    @fxck
    ContributorAuthor

    Menu and selects are different thing altogether I think, so if it doesn't disallow multi-lines, I think it would really be worth exploring.

  5. crisbeto commented on Apr 4, 2017

    @crisbeto
    Member

    I agree on not capping the width. Regarding the multi line text, we can refer to the native select which also truncates instead of wrapping.

  6. fxck commented on Apr 4, 2017

    @fxck
    ContributorAuthor

    Yes, but honestly, I think that material should enhance the experience, not blindly follow design that hasn't changed in 15 years..

  7. jelbourn commented on Apr 13, 2017

    @jelbourn
    Contributor

    Based on the material design spec, we don't see multi-line options for <md-select> being permitted. For autocomplete, though, it should be doable. Tracking via #4071

  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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions