Components: mat-list-item shows matListIcon to the right when using ngSwitch

Created on 13 Oct 2017  路  3Comments  路  Source: angular/components

Bug

What is the expected behavior?

Mat-list-item should always show matListIcon to the left

What is the current behavior?

When using ngSwitch, matListIcon is moved to the right

What are the steps to reproduce?

Take a look at:

https://stackblitz.com/edit/angular-material2-issue-jbu3mk?file=index.html

Check_circle icon should be to the right

What is the use-case or motivation for changing an existing behavior?

This was working fine in previous angular material versions.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

I'm using Angular Material 2.0.0-beta.12

Is there anything else we should know?

P4 materialist

Most helpful comment

Any updates? This is still an issue with Angular 8.2.12, and also with Angular 9.1.7

All 3 comments

The issue seems to come from the fact that when you wrap the icon in an ng-container, it ends up moving the icon to the end of its parent which breaks some CSS selectors that expect it to be first.

Any updates? This is still an issue with Angular 8.2.12, and also with Angular 9.1.7

Any Updates?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmalerba picture mmalerba  路  77Comments

abdulkareemnalband picture abdulkareemnalband  路  165Comments

bboehm86 picture bboehm86  路  57Comments

kara picture kara  路  94Comments

anderflash picture anderflash  路  59Comments