You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When in a dialog, the width of the button is only 6px. I tried the following workaround <p-dialog (onAfterShow)="dialogInitialized = true"> <p-inputSwitch *ngIf="dialogInitialized"></p-inputSwitch> </p-dialog>
but I got this error
ORIGINAL EXCEPTION: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'
The text was updated successfully, but these errors were encountered:
That isn't a bug with Prime, this is the Angular detection framework. Your value of dialogInitialized is changing. When Angular is creating the component, it is using default value for dialogInitialized in the ngIf statement. The code in onAfterShow is then run and changes the value to true, the detection listener then looks again and realises that the values has changed, but it didn't change in a binding. So it throws this as an error. There are ways around it, one of the simplest is to put Angular into production mode and this check is not performed.
When in a dialog, the width of the button is only 6px. I tried the following workaround
<p-dialog (onAfterShow)="dialogInitialized = true"> <p-inputSwitch *ngIf="dialogInitialized"></p-inputSwitch> </p-dialog>
but I got this error
The text was updated successfully, but these errors were encountered: