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

infiniteScrollUpDistance strange behavior #290

Closed julienmarantes closed 4 years ago

julienmarantes commented 6 years ago

Expected Behavior

Call event method when user is scrolling to the top of the list, same as the bottom one

Actual Behavior

Event is called inconsistently even while trying diferent infiniteScrollUpDistance values

Steps To Reproduce / Demo (if applicable)

Use 6.0.0 version on a simple list with those params :

        infiniteScroll
        [infiniteScrollDistance]="2"
        [infiniteScrollUpDistance]="1.5"
        [infiniteScrollThrottle]="300"
        (scrolled)="onScrollEvent('bot', $event)"
        (scrolledUp)="onScrollEvent('top', $event)"
        [scrollWindow]="false"

Context

An Angular 6 project with angular cli and in typescript target es5

Your Environment

orizens commented 6 years ago

please attach a stackblitz demo