orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.23k stars 224 forks source link

(scrolled) event Not triggering in multiple chrome versions. #399

Closed Nishit-dev closed 2 years ago

Nishit-dev commented 2 years ago

I am facing a weird issue, after following all the steps mentioned in https://www.npmjs.com/package/ngx-infinite-scroll I am still not able to implement Infinite Scroll. (scrolled) event is not triggered when scrolled down. Below are the details. Please Let me know if any more clarification is required.

Angular version: "@angular/cli": "^13.3.1", Chrome version: Version 98.0.4758.102 (Official Build) (64-bit) Version 89.0.4389.40 (Official Build) beta (64-bit) npm Veriosn: 7.24.0

sample Code: <li class="grid m-0" infiniteScroll [infiniteScrollDistance]="2" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [scrollWindow]="false" *ngFor="let res of notificationMessages; let i = index"> // My code </li>

Note: The height of the <ul> wrapping the <li>is fixed. see Below

image

Nishit-dev commented 2 years ago

This issue is resolved. I was applying infinite scroll directive on individual element instead of the container.