Components: MatSelectionList: ExpressionChangedAfterItHasBeenCheckedError

Created on 5 Mar 2019  路  3Comments  路  Source: angular/components

What is the expected behavior?

There should be no ExpressionChangedAfterItHasBeenCheckedError

What is the current behavior?

An ExpressionChangedAfterItHasBeenCheckedError is encountered when using MatSelectionList with a form control that has a non-empty array as its initial value.

What are the steps to reproduce?

StackBlitz

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

"@angular/material": "7.3.1"

Is there anything else we should know?

P3 has pr

Most helpful comment

Hi,
I see the issue has been closed about 2 months ago, but the issue seems to be still existing. I've updated the stackblitz to Angular 8.0.0-rc.0 and the error is still thrown:
https://stackblitz.com/edit/angular-bmnswy-wmwxen?file=app%2Flist-selection-example.ts

All 3 comments

Hi,
I see the issue has been closed about 2 months ago, but the issue seems to be still existing. I've updated the stackblitz to Angular 8.0.0-rc.0 and the error is still thrown:
https://stackblitz.com/edit/angular-bmnswy-wmwxen?file=app%2Flist-selection-example.ts

Had to fix it by running this.changeDetectorRef.detectChanges(); after the variable used for the items got updated.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RoxKilly picture RoxKilly  路  3Comments

dzrust picture dzrust  路  3Comments

LoganDupont picture LoganDupont  路  3Comments

vitaly-t picture vitaly-t  路  3Comments

xtianus79 picture xtianus79  路  3Comments