-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions
Description
Bug, feature request, or proposal:
Proposal: allow component to have an icon / image besides the text
What is the expected behavior?
Something like:
<mat-optgroup *ngFor="let group of categories | async" [label]="group.category">
<img src="{{group.symbol}}" />
<mat-option *ngFor="let elem of group.elements" [value]="elem">
{{ elem }}
</mat-option>
</mat-optgroup>What is the current behavior?
Currently, component renders as a label
<mat-optgroup *ngFor="let group of categories | async" [label]="group.category">
<mat-option *ngFor="let elem of group.elements" [value]="elem">
{{ elem }}
</mat-option>
</mat-optgroup>What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
In my case, trying to group elements into categories, and I'd like to display each category icon / image alongside the text
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
All
Is there anything else we should know?
Not that I'm aware
kwilliams-curago and dzena
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functions