-
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
VirtualScroller triggers onLazyLoad event even though there is no scroll event. #11987
Comments
Is this a regression ? I am facing the same issue in dropdowns, the same event shouldn't be triggered twice |
@mertsincan I see that you are the one who worked on VirtualScoll. It is complitelly broken when lazy, specifically when working with dropdowns. |
Hi, Thanks for reporting the issue, I added it to the milestone |
We have the same issue triggering endless events for virtual scroll / lazyload mode in p-dialog component. |
@mnhock I am working on a PR that also fixes lazy to work with filters |
Thank you so much @yelhouti ! I appreciate the work of your guys! |
@mnhock I am just a user of the library like you :) |
@mnhock for the dropdown, the issue was because of a scroll that triggered the reload, I suspect the same thing happens in your component. I am fixing dropdown and multiselect for now |
@cetincakiroglu could you check the PR please, Also I an unable to run ng build locally:
It seems like an issue witch package versions, could you please tell the node version you are using? and also can you ensure that when you remove node_modules and reinstall it keeps building. Thanks in advance Edit: fixed by updating ng-package to match angular version pushed that too |
Same thing happens to us with p-table when used with virtualscroll and lazy: endless calls of onLazyLoad method even when no scoll event is happening. |
For performance, you can use |
Describe the bug
VirtualScroller triggers onLazyLoad event even though there is no scroll event.
You can view the console on this demo
Open up the console and you will see the event being logged constantly.
Environment
Simple angular project with latest version of angular and primeng
Reproducer
https://stackblitz.com/edit/primeng-virtualscroller-demo-cqpv7h
Angular version
14.2.3
PrimeNG version
14.1.2
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
16.14.2
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
I would expect the lazyLoad event to trigger when there is a scroll event.
The text was updated successfully, but these errors were encountered: