-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Dynamic Dialog not being properly destroyed on close #17123
Fix: Dynamic Dialog not being properly destroyed on close #17123
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@stewieoO is attempting to deploy a commit to the primetek Team on Vercel. A member of the Team first needs to authorize it. |
Hi, Thanks a lot for the effort and support! |
@stewieoO @cetincakiroglu the issue has been present and has been caused since the Angular 18.2.2 release and is unrelated to the mentioned PrimeNG 17.18.10 release in #16402. My zoneless PrimeNG application worked perfectly fine with PrimeNG 17.18.15 until I upgraded from Angular 18.2.0 to 18.2.13. I thoroughly tracked down the root cause of the bug, and it seems to be a change in the The change that causes this is an afterRender hook change in @angular/core, which is not even mentioned in the Angular 18.2.2 changelog: After this change even some Angular tests and the angular.dev website had to add an additional ref destroy call, the same as we did with the workaround in #16402 (comment), see: Related PRs: |
Oh, that is interesting. The changes to the angular tests you mentioned only do the .destroy() though, not the .detectChanges() |
Fixes #16402
I'm not 100% sure why this works considering the component ref gets destroyed before calling it's change detector, but as far as i can tell it just works.