ERROR Error: ASSERTION ERROR: Should be run in update mode [Expected=> false == true <=Actual] due to changeDetection in Accordion component
If you have a PrimeNG PRO Support subscription please post your issue at;
https://pro.primefaces.org
where our team will respond within 4 business hours.
If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.
Current Queue Time for Review Without PRO Support: ~8-12 weeks. With PRO Support: 1 hour
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 demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/github/primefaces/primeng-issue-template
Current behavior In accordion.ts:
@Input() get selected(): any {
return this._selected;
}
set selected(val: any) {
this._selected = val;
if (!this.loaded) {
this.changeDetector.detectChanges(); <---- ERROR is from this line right here!
}
}
Expected behavior On change detection error. This is apparently an issue that has not been resolved in angular 9/10 where items in the constructor or possible change detection in a setter/getter cause this problem. This is the angular issue here: https://github.com/angular/angular/issues/32756
It appears {static: false} needs to be set somewhere in the accordion ts file but I am not sure where Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Please tell us about your environment: Windows 10
-
Angular version: 10
-
PrimeNG version: 10.0.0 rc1
-
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 ] Chrome, IE, Edge
-
Language: Typescript
-
Node (for AoT issues):
node --version= v12.17.0
How can we get the error? I could not replicate yet.
any news about this issue? because i've the same here, this issue block any migration possible to angular 9 - 10 .. :-/
here is stackblitz minimal repro: https://github-e5uicu.stackblitz.io
That should have an accordion with 1 tab, if you take out the selected="true" on the tab definition it works
Looks like changing it to [selected]="true" fixes the issue