orizens / ngx-infinite-scroll

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

The callback does not trigger at all (v6.0.1) #300

Closed mvelebit closed 4 years ago

mvelebit commented 5 years ago

The following code simply fails to trigger the callback:

<div infiniteScroll
     [infiniteScrollDistance]="1"
     [infiniteScrollUpDistance]="1.5"
     [infiniteScrollThrottle]="50"
     (scrolled)="loadMore()">
  <app-list></app-list>
</div>

TheloadMore() method basically appends more divs into the app-list component, thus expanding this div. The result is basically alike any social media's homepage. The exact same setup works on v0.8.4 but doesn't work here. The css isn't appended as I actually have no css. Any clues?

The only way I actually managed it to work (at all) was setting the div's height to a fixed value (BUT LESS THAN 100vh, for some reason, maybe I hadn't tested it thoroughly enough) and then setting the [scrollWindow]="false", ending up with a small div with an infinite scroll inside it.

This was hinting towards the scrollWindow failing altogether when it's set to true.

vjscriv commented 5 years ago

I am seeing the same behvaior.

Thank you for finding and posting a work around mvelebit! Saved me from having to switch to something else.

KobbyMmo commented 5 years ago

mine is not working either, not even the workaround version (6.1.7)

kodamirmo commented 5 years ago

Hi guys, how do you solve this?

orizens commented 5 years ago

please reproduce on stackblitz