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

immediateCheck isn't wired up #341

Closed cromefire closed 2 months ago

cromefire commented 4 years ago

Your issue may already be reported!

Expected Behavior

With immediateCheck it should trigger directly on load (if there are not enough items)

Actual Behavior

It seems that immediateCheck isn't even wired up to do anything: https://github.com/orizens/ngx-infinite-scroll/blob/7dc71e98ab3669090b2e6ec40d717938b9cfa02b/src/modules/infinite-scroll.directive.ts#L33

Possible Solution

It should be wired up (again?) and/or there should be a way to trigger it manually

Steps To Reproduce / Demo (if applicable)

[ ] Please share a stackblitz or plunkr demo reproducing this issue

Context

The list I load it not long enough by default (depending on screen size) and it should be extended once it's loaded

Your Environment

orizens commented 4 years ago

correct - immediateCheck is not implemented. achieving the task you describe in Context requires some thorough discussion.

Plonq commented 4 years ago

ng-infinite-scroll always executed (fired the output) until the scroll distance was exceeded. A similar approach would work here I believe.

The alternatives aren't great:

  1. Manually load the first page on load, hoping the page size is big enough to create scrollbars
  2. Manually loop and fetch pages, stopping when the element has scrollbars
sagrawal31 commented 2 years ago

Any update here?