TriStateCheckbox ExpressionChangedAfterItHasBeenCheckedError for disabled binding
Posted: 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:
When disableWhenNull() returns true, this message is issued in console:
Test environment:
Thank you!
José
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>
I simulated the issue here: https://stackblitz.com/edit/angular-pri ... onent.htmlERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ui-state-focus: true'. Current value: 'ui-state-focus: false'.
Test environment:
- PrimeNG 6.1.7
- Angular 6.0.4
- Chrome 86.0.4240.193.
Thank you!
José