PrimeNg 4.0.3 ExpressionChangedAfterItHasBeenCheckedError when preselect a p-radioButton
I'm submitting a ... (check one with "x")
[ X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Plunkr Case (Bug Reports) Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.
http://plnkr.co/edit/VZbdZfQ7SuTV87tTkbYR?p=preview
Current behavior
The error is described here https://forum.primefaces.org/viewtopic.php?p=157266#p157266
Expected behavior
not the ExpressionChangedAfterItHasBeenCheckedError
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
- Angular version: 2.0.X
- PrimeNG version: 2.0.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: [all | TypeScript X.X | ES6/7 | ES5]
-
Node (for AoT issues):
node --version=
Updated:
Seems fixed after "primeng": "^4.1.0-rc.3"
Original: Same issue here: Angular version: 4.1.2 PrimeNG version: 4.0.0
HTML:
<p-radioButton
formControlName="graduated"
name="graduated"
[value]=true
label="Graduated" ></p-radioButton>
<p-radioButton
formControlName="graduated"
name="graduated"
[value]=false
label="Still Student" ></p-radioButton>
TS:
...
this.studentForm= this.formBuilder.group({
graduated: ''
});
...
ngOnInit() {
if (this.student) this.studentForm.patchValue(this.student);
}
...
Can be closed because it's a duplicate of #2761.
@cagataycivici this happens for me as well with p-autocomplete when it gets disabled: http://plnkr.co/edit/RLKpyS4Be3IA9Ytc49SY?p=preview