angular2-multiselect-dropdown: ExpressionChangedAfterItHasBeenCheckedError

  • versions:
@angular-devkit/core            11.0.5
"angular2-multiselect-dropdown": "^4.6.9",
  • error when clicking on the component
ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for 'top': '563'. Current value: '166'.
    at throwErrorIfNoChangesMode (core.js:6536)
    at bindingUpdated (core.js:12647)
    at checkStylingProperty (core.js:16475)
    at ɵɵstyleProp (core.js:16364)
    at AngularMultiSelect_Template (angular2-multiselect-dropdown.js:4661)
    at executeTemplate (core.js:9310)
    at refreshView (core.js:9179)
    at refreshComponent (core.js:10345)
    at refreshChildComponents (core.js:8976)
    at refreshView (core.js:9229)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 25 (3 by maintainers)

Most upvoted comments

Sorry my bad. The library is being upgraded to angular v11+, in coming release. Currently the library is in v8. Once the upgrade is released, this error will be resolved. Mostly in couple of days this would be fixed.

I solved this doing this and it works OK:

import {AfterViewChecked} from '@angular/core';

constructor(private changeDetector: ChangeDetectorRef) { }

ngAfterViewChecked() {
    this.changeDetector.detectChanges();
  }

Hm, it seems there is no progress