Skip to content

md-option allow multiple lines #3883

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

Closed
fxck opened this issue Apr 3, 2017 · 8 comments
Closed

md-option allow multiple lines #3883

fxck opened this issue Apr 3, 2017 · 8 comments

Comments

@fxck
Copy link
Contributor

fxck commented Apr 3, 2017

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

@crisbeto
Copy link
Member

crisbeto commented Apr 4, 2017

  1. I'm not sure whether the spec allows for multi-line options.
  2. As you mentioned, this makes the positioning a bit harder.

@fxck
Copy link
Contributor Author

fxck commented Apr 4, 2017

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?

@willshowell
Copy link
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

@fxck
Copy link
Contributor Author

fxck commented Apr 4, 2017

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.

@crisbeto
Copy link
Member

crisbeto commented Apr 4, 2017

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.

@fxck
Copy link
Contributor Author

fxck commented Apr 4, 2017

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

@jelbourn
Copy link
Member

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

@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 Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants