-
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
Feature request: custom view value for select and autocomplete #5067
Comments
Have you try something like:
In the autocomplete md-option? It works with text. Maybe it works with icons too (material icons or font awesome). |
Take a look at this plunker: https://plnkr.co/edit/v3EoZp?p=preview |
@julianobrasil that looks great thanks! However I accidentally noticed that your code doesn't work on Firefox 53.0.3 Can you raise a bug for that? Thanks! |
I think it's an issue with nested divs in Firefox. I modified the plunker. This will work both in Chrome, Firefox, Edge and IE:
|
Closing this since I believe it's doable today (it would just be your mat-option template). Free free to open another issue if that's not the case. |
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?
Select and Autocomplete allow custom view values, for example:
https://material.io/guidelines/components/menus.html#menus-usage
This Menu allows icons in addition to text.
I understand the example is a Menu not Select or Autocomplete, but they are under the same category in Material Design
What is the current behavior?
The values are limited to strings, and doesn't allow custom layout inside the Select and Autocomplete dropdown.
What is the use-case or motivation for changing an existing behavior?
As per the example screenshot.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 2.0.0-beta.6
The text was updated successfully, but these errors were encountered: