ngx-infinite-scroll icon indicating copy to clipboard operation
ngx-infinite-scroll copied to clipboard

immediateCheck isn't wired up

Open cromefire opened this issue 4 years ago • 3 comments

Your issue may already be reported!

  • [x] Please search on the issue track before creating one.

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

  • [x] Version used: angular 8.2.7 and infinite-scroll 8.0.0
  • [x] Browser Name and version: Firefox 71 and Chromium 76
  • [x] (Optional) Operating System and version (desktop or mobile): N/A
  • [x] (Optional) Link to your project: https://github.com/cromefire/jellyfin-angular/blob/master/src/app/common/slider/slider.component.html

cromefire avatar Sep 22 '19 22:09 cromefire

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

orizens avatar Jun 02 '20 16:06 orizens

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

Plonq avatar Aug 20 '20 06:08 Plonq

Any update here?

sagrawal31 avatar Apr 21 '22 10:04 sagrawal31