i'm using ngx-infinite-scroll module with Angular 5. My browser is Chrome.
The onScrollDown() action is fired when i scroll down with the scrolling bar inside my div. To make it work, i need to give a height to my content and [scrollWindow] should be set to false:
css
.search-results {
height: 200px;
overflow: scroll;
}
template
<div class="search-results"
infinite-scroll
[infiniteScrollDistance]="5"
[infiniteScrollThrottle]="10"
[scrollWindow]="false"
(scrolled)="onScrollDown()">
<p *ngFor="let i of array">
{{i}}
</p>
</div>
But when i set [scrollWindow] to true (which is the default setting), and remove the search-results class (no height set then), theonScrollDown() is never fired even when i scroll down with the default right bar of my browser. Any idea why the default windows scrolling doesnt trigger the onScollDown() action? Thanks
hi.
scrollWindow should be set to true when you want infinite scroll to listen
to the Window scroll event
On Fri, Dec 15, 2017 at 10:37 PM kenp77 notifications@github.com wrote:
i'm using ngx-infinite-scroll module with Angular 5. My browser is Chrome.
The onScrollDown() action is fired when i scroll down with the scrolling
bar inside my div. To make it work, i need to give a height to my content
and [scrollWindow] should be set to false:css
.search-results {
height: 200px;
overflow: scroll;
}template
{{i}}
But when i set [scrollWindow] to true (which is the default setting), and
remove the search-results class (no height set then), theonScrollDown()
is never fired even when i scroll down with the default right bar of my
browser. Any idea why the default windows scrolling doesnt trigger the
onScollDown() action? Thanks—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/orizens/ngx-infinite-scroll/issues/221, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AA1oREXXhtRaDGMFB5QkyrGf_QyWqTRgks5tAtiQgaJpZM4RD-Ri
.>
Oren Farhi
Founder at Orizens.com
Senior Front End Engineer & Consultant
http://www.orizens.com
@orizens
I'm running into the same problem. Check out this plunker: https://plnkr.co/edit/zrglhWQuww51kPhwxEvN
It doesn't seem to work with the latest version of this project (0.8.1). If you roll back the version to, for example, 0.4.0, it will work.
hi @samu
please test this version:
npm i ngx-infinite-scroll@next
fixed by c80694e6a465d09072cbbd47c44c9ca67ca8d852
@orizens I've just tested the @next version and it solved my problem when I wanted to trigger scrolled using [scrollWindow]="false"
@FacundoGFlores thanks.
v 8.2.0 is published now.
which version of ngx-infinite-scroll should we use with Angular5 and rxjs:5.5.3 ?
@riteshsingh2k version 0.8.4 https://www.npmjs.com/package/ngx-infinite-scroll/v/0.8.4
for me version 0.8.2 is working with Angular5 and rxjs:5.5.3 , but version 0.8.3 is not working , giving error for rxj , I think version 0.8.3 requires rxj6 ?
getting following error :
Error on fetch for rxjs/operators at file:///home/appjat/node_modules/rxjs/operators/index.js
Loading ngx-infinite-scroll
Loading dist/tmp/app/jatobject/schemaObject.module.js
Most helpful comment
@FacundoGFlores thanks.
v 8.2.0 is published now.