Skip to content
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

DynamicDialog: Loop ChangeDetection #16205

Open
raiworld81 opened this issue Aug 9, 2024 · 4 comments
Open

DynamicDialog: Loop ChangeDetection #16205

raiworld81 opened this issue Aug 9, 2024 · 4 comments
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback Status: Pending Review Issue or pull request is being reviewed by Core Team
Milestone

Comments

@raiworld81
Copy link

Describe the bug

Since version 17.18.4, there has been a bug where, upon launching a DynamicDialog via the appropriate service, Angular's change detection enters a loop. I have encountered the same issue in version 17.18.8 as well. I believe the problem lies in the containerStyle getter, where continuously recreating the configurations triggers the change detection loop.

image

Environment

Reproduced in all browsers.

Reproducer

No response

Angular version

17.3.11

PrimeNG version

17.18.8

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.11.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@raiworld81 raiworld81 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 9, 2024
@EnricoMessall
Copy link
Contributor

EnricoMessall commented Aug 9, 2024

Hey @raiworld81 i dont think the change detection is doing loops here because of that change. Instead the dynamic dialog is set to the Default Change Detection and doesn't uses OnPush. Thats why you always might see change detection for it because Default triggers CD automatic. So its overall no bug.

So it might be a better request to overall change dynamicdialog to OnPush Change Detection :)

@raiworld81
Copy link
Author

Sure, this definitely has an impact. I hadn’t noticed the ChangeDetectionStrategy that was set. In any case, yes, it would be appropriate to modify it.

@Zodiark1020
Copy link

This is still an issue, on version 17.18.10.

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 16, 2024
@mertsincan mertsincan added this to the 17.x milestone Dec 16, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 16, 2024
@mertsincan mertsincan added the Resolution: Help Wanted Issue or pull request requires extra help and feedback label Dec 16, 2024
Copy link

Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Help Wanted Issue or pull request requires extra help and feedback Status: Pending Review Issue or pull request is being reviewed by Core Team
Projects
Status: Review
Development

No branches or pull requests

4 participants