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

Use with ngx-perfect-scrollbar #301

Closed Cuberice closed 5 years ago

Cuberice commented 6 years ago

Is it possible to use ngx-perfect-scrollbar with ngx-infinite-scroll?

orizens commented 6 years ago

Ngx infinite scroll listens to dom scroll event. If the plugin you mention use a custom scroll event, then it wouldn't work.

nomanbiniqbal commented 5 years ago

+1

guryanov-a commented 5 years ago

@Cuberice @nomanbiniqbal @orizens

it's possible:

  1. apply ngx-perfect-scrollbar as a directive (see in docs how) on the same element as the infinite-scroll directive.
  2. apply [scrollWindow]="false" option from ngx-infinite-scroll on the same element

Demo: https://stackblitz.com/edit/ngx-infinite-scroll-plus-ngx-perfect-scrollbar