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

AutoComplete: Change detection issue in dialog component #14262

Closed
rdkwow opened this issue Dec 1, 2023 · 1 comment · Fixed by #14268
Closed

AutoComplete: Change detection issue in dialog component #14262

rdkwow opened this issue Dec 1, 2023 · 1 comment · Fixed by #14268
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@rdkwow
Copy link

rdkwow commented Dec 1, 2023

Describe the bug

In PrimeNG version 16.9.1, we encountered an issue with change detection when using the autocomplete component inside a dialog. The error occurs when preselecting a value in the form. This issue also exists in the latest version (17.0.0-rc.1).

Error message:

ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'. Expression location: CountryListDemo component.

Environment

Angular and PrimeNG, running on a Windows 10 box

Reproducer

https://stackblitz.com/edit/ojayvu?file=src%2Fapp%2Fdemo%2Fcountrylistdemo.ts

Angular version

16.2.12

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.15.0

Browser(s)

Chrome, Firefox, Edge

Steps to reproduce the behavior

  1. Go to the Stackblitz page shown
  2. Open dialog
  3. Check console output

Expected behavior

It works without any errors, as it did in version 16.6.0.

@rdkwow rdkwow added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 1, 2023
@SoyDiego
Copy link
Contributor

SoyDiego commented Dec 3, 2023

Hi @rdkwow. I did a PR solving the problem.
You can check here #14268.
Now we should wait if PrimeNG Team approve it.

Thanks!

@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working 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 6, 2023
@cetincakiroglu cetincakiroglu added this to the 17.0.0 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants