TriStateCheckbox ExpressionChangedAfterItHasBeenCheckedError for disabled binding

UI Components for Angular
Post Reply
jrpereirajr
Posts: 1
Joined: 14 Mar 2018, 18:43

23 Nov 2020, 22:23

Hi there.

When I try to disable a TriStateCheckbox through a binding function, I got an ExpressionChangedAfterItHasBeenCheckedError.

The code for TriStateCheckbox is:

Code: Select all

<p-triStateCheckbox [(ngModel)]="value" label="status" [disabled]="disableWhenNull()"></p-triStateCheckbox>
When disableWhenNull() returns true, this message is issued in console:
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ui-state-focus: true'. Current value: 'ui-state-focus: false'.
I simulated the issue here: https://stackblitz.com/edit/angular-pri ... onent.html
Test environment:
  • PrimeNG 6.1.7
  • Angular 6.0.4
  • Chrome 86.0.4240.193.
Could you help me to find what's wrong, please?

Thank you!
José

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests