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

Defer directive throws ExpressionChangedAfterItHasBeenCheckedError if visible from the beginning #9984

Closed
sbs101 opened this issue Mar 10, 2021 · 0 comments
Assignees
Labels
LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@sbs101
Copy link

sbs101 commented Mar 10, 2021

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)
https://stackblitz.com/edit/primeng-defer-demo-s6pozm

Current behavior
When applying the pDefer directive to a component which is already visible in the viewport without scrolling at the time of page loading in Angular a ExpressionChangedAfterItHasBeenCheckedError is thrown (as usualfor this kind of error only in development mode).

Expected behavior
No ExpressionChangedAfterItHasBeenCheckedError should be thrown.

Minimal reproduction of the problem with instructions
Start the Plunkr Case (based on the example code but without the need to scroll down to the the table) and look at the browser console output. You will see the ExpressionChangedAfterItHasBeenCheckedError message.

What is the motivation / use case for changing the behavior?
Angular stops behaving correctly after these kind of errors, so it has to be fixed.

Please tell us about your environment:
Windows 10, Firefox 86

  • Angular version: 11.0 (Plunkr), 11.2.1

  • PrimeNG version: 11.3, 11.2.3

  • 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 ]
    Firefox 86, Chrome 88

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    Typescript 4.1.3

  • Node (for AoT issues): node --version =

@yigitfindikli yigitfindikli self-assigned this Mar 11, 2021
@yigitfindikli yigitfindikli added Status: Pending Review Issue or pull request is being reviewed by Core Team Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Mar 11, 2021
@yigitfindikli yigitfindikli added this to the 11.3.1 milestone Mar 11, 2021
@yigitfindikli yigitfindikli added LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 and removed LTS-PORTABLE labels Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-FIXED-9.2.5 Fixed in PrimeNG LTS 9.2.5 LTS-FIXED-10.1.0 Fixed in PrimeNG LTS 10.1.0 Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants