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
{{ message }}
Repository navigation
bug: ion-accordion plays animation on initial state update when using Angular property binding #30613
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
When setting an ion-accordion to be initially open by using [value]='...' on the ion-accordion-group, the accordion is first rendered closed and then animates open.
Expected Behavior
The initial state when the accordion first loads should not play an animation.
Click the reload button in the Stackblitz browser preview
Observe that the accordions in the first two columns play an animation (they use [value]="..."), while the last column doesn't (it uses value="..."). In all cases the actual value is constant.
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v20.19.1 (/usr/local/bin/node)
npm : 10.8.2
OS : Linux 5.0
Additional Information
The issue is a regression since v8.6.0. The issue didn't occur with v8.5.9.
The issue #28506 was similar and the cause for this issue might be related to component initialization order. The initial values for Angular inputs are sometimes set after the Stencil component has fully initialized.
Issue #30552 was also a timing issue (but using React instead of Angular) where a property of ion-tab was not set in time for the first render. This was also introduced in v8.6.0.
I suspect the Stencil update from 4.20.0 to 4.29.3 (#30132) changed something about the timings on component initialization.
This issue was caused by a change to Stencil that corrected the order in which components with children rendered and triggered their lifecycle hooks. I have a PR up that I believe will address this issue in Ionic Framework.
If you would like to test the solution PR, the current dev build is:
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
chore: upgrade dependencies, downgrade ionic
chore: upgrade dependencies, downgrade ionic (#2128)
aeharding commentedon Oct 15, 2025
FWIW, this isn't an Angular-specific issue, it also happens in React. It can be seen on the stock accordion example here:
https://stackblitz.com/edit/dbaxphvw?file=src%2FApp.tsx
Just refresh the preview to see it animate, when it shouldn't.
ShaneK commentedon Oct 16, 2025
Hey! Thanks for the report!
This issue was caused by a change to Stencil that corrected the order in which components with children rendered and triggered their lifecycle hooks. I have a PR up that I believe will address this issue in Ionic Framework.
If you would like to test the solution PR, the current dev build is:
fix(accordion-group): skip initial animation (#30729)
ShaneK commentedon Nov 5, 2025
Hey! The fix for this has been released in v8.7.9
ionitron-bot commentedon Dec 5, 2025
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.