orizens / ngx-infinite-scroll

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

(scrolled) not fired on Windows scrolling #306

Closed IrmaKarasoftic closed 4 years ago

IrmaKarasoftic commented 5 years ago

Hi, I am using ngx-infinite-scroll with Angular 6. I can't get window scroll to work. My issue is this:


<div class="outer-div">
   <div *ngFor="let item of items">
      //items
   </div>
   <div class="search-results" infiniteScroll 
   [infiniteScrollDistance]="0" 
   [infiniteScrollThrottle]="500"
   (scrolled)="onScroll()">
   </div>
</div>

When onScroll is triggered, new items are pushed in the items list. I need .outer-div class to have {overflow-y: auto}. When I set overflow-y to auto, vertical scrollbar exists, but the onScroll() method isn't called. When I remove overflow-y: auto, it is set to default (visible), it works. But this is not what I need. Can you tell me what am I doing wrong and why this doesn't work?

SerjioH commented 5 years ago

Same thing.

kodamirmo commented 5 years ago

+1

orizens commented 5 years ago

please edit the the issues's description using the template

ganqqwerty commented 5 years ago

can you please show your issue on stackblitz?