ExpressionChangedAfterItHasBeenCheckedError when preselect a p-radioButton #7940
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ...
Stackblitz demo
Minimal Angular 8/PrimeNg 8 app that demonstrates the issue
https://stackblitz.com/edit/angular-zhmbkf
Current behavior
Initially getting
ExpressionChangedAfterItHasBeenCheckedError
(exactly like in #3100) after upgrading to Angular 8 and PrimeNG 8. In Angular 7/PrimeNg 7 the error did not occur.My 2 cents:
Looks like setting
static
totrue
in(https://github.com/primefaces/primeng/blob/master/src/app/components/radiobutton/radiobutton.ts#L57)
resolves the issue.
Expected behavior
Well, no error would be nice :-)
Minimal reproduction of the problem with instructions
Just open the Stackblitz and you will see the error in the console
Please tell us about your environment:
Browser: Chromium 75.0.3770.90
Language: TypeScript 3.4
The text was updated successfully, but these errors were encountered: