-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Request : md-option autoHeight support for <md-select> and/or <md-autocomplete> #4071
Comments
Possible duplicate of #3883 |
Potentially doable for autocomplete, would be much more difficult for select. |
@jelbourn yes it will be great to have it for autocomplete, I believe many Web Apps will rely heavily on autocomplete to select and filter hundreds of options (and I don't think |
@gedclack you are only saying that under the assumption that md-select can not do that, which it certainly can and there is pending (for two months) PR for it already #3211 In fact, I think autocomplete is definitely NOT the right component for selecting, that's what select is for, as autocomplete doesn't by default (and currently not even with option) enforce the selection to be the one of the list, it simply does the completion. Also @jelbourn it will only be more difficult if you do that the actual "autoheight", if you allow the user to set the default (fixed) height, instead of hardcoding it, or do something like md-line on md-list, it shouldn't be difficult at all. and
I don't see it being prohibited either, but if it is the case, allowing the user to set the fixed height of all items should still be considered. |
I believe having the possibility to use |
@jelbourn is this resolved in the recent updates? |
@jelbourn is there an ETA for providing multiline support for autocomplete suggestion panel? |
I'm using this workaround and it works fine for now:
|
That's not gonna work. The height is internally hardwired so they can calculate position of the active item upon opening. Overriding the height just in css is going to mess it up. |
@fxck it worked well enough for my use case. That being said, it's definitely not a solution and this issue should be open. In any case, a have another workaround that should play nicer with other css rules:
(material applies 'mat-multi-line' class when there are more than 3 matLine) (IMHO we probably need something like MatFitContent directive on mat-list-item that does the same) |
Also apparently you are talking about mat-list, while this issue is about mat-autocomplete and mat-select. |
Any updates on this function? |
This takes care of my needs for displaying multiple lines of content in a single mat-option.
|
Could someone provide an update on this? What would the proper syntax for using |
Adding this style to So final component should like something like:
|
I'm using @martin-dmtrv solution but with these styles:
Which more following base Material styles. |
Any updates? |
for now I'm using similar workaround, adding this css below and using it on my AutoComplete's
|
This is supported in the MDC-based version of |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Feature Request
What is the expected behavior?
option to choose between fixed height or auto-height to fit
md-option's
contents.What is the current behavior?
md-option's
height is fixed to 48pxWhat is the use-case or motivation for changing an existing behavior?
its very helpful and descriptive to have an additional text (maybe in smaller font-size) to show more information in the options, rather than having one line of text which only show one information.
Currently on :
Angular material 2.0.0-beta.3
The text was updated successfully, but these errors were encountered: