Closed mathilde-c closed 7 years ago
hi. can you use this without "scrolledUp"? I suspect this method's behavior might be broken.
On Mon, Jul 24, 2017 at 9:57 AM Mathilde notifications@github.com wrote:
Hi,
I am so glad to have found your ngx-infinite-scroll module. That s exactly what I needed for the angular4 application I am developping.
I have set up everything nicely so far and I am facing a problem while handling scrollUp. Here is my setup:
`<div ngIf="resultFound()" class="search-results" infiniteScroll*
[infiniteScrollDistance]="1" [infiniteScrollUpDistance]="1" [infiniteScrollThrottle]="300" (scrolledUp)="updatePreviousResults()" (scrolled)="updateNextResults()" [scrollWindow]="false"> <tbody class="list_" *ngFor="let case of listOfResults"> </tbody> </div>`
my div is 520px high (exactly 10 rows from the table - hard coded at the moment).
With my current setup I am expecting "scrollUp" event to be triggered when I reach the top of the container: triggering a windowing behavior on cached results - dynamically adding rows a the "begining" of the container and removing the same amount from the end.
However, on each scroll now the scrollup event is being triggered.
I have tracked down that the "shouldScroll" method always return true when scrolling up in my case because my container breakpoint is always higher than remaining distanc eto scroll.
As you can see from my setup, I am not scrolling on window but on a div inside a table. I hope those information are sufficients.
Cheers
— 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/174, or mute the thread https://github.com/notifications/unsubscribe-auth/AA1oRH7jLqIrWQKFtlegsAqmtZS3BOGiks5sRKLBgaJpZM4OhOTx .
--
Oren Farhi CEO at Orizens.com Senior Front End Engineer & Consultant http://www.orizens.com
Hi, @orizens , thanks to bring us such an amazing tool, it's really helpful.
As @CocotteDodue , I have the same issue, and I would like to know if is there any plan to solve it in a near future?
Thanks a lot.
just - updated the demo with a scrollup example.
Hi,
I am so glad to have found your ngx-infinite-scroll module. That s exactly what I needed for the angular4 application I am developping.
I have set up everything nicely so far and I am facing a problem while handling scrollUp. Here is my setup:
`<div *ngIf="resultFound()" class="search-results" infiniteScroll
my div is 520px high (exactly 10 rows from the table - hard coded at the moment) and I have 17 elements in my listOfResults.
With my current setup I am expecting "scrollUp" event to be triggered when I reach the top of the container: triggering a windowing behavior on cached results - dynamically adding rows a the "begining" of the container and removing the same amount from the end.
However, on each scroll now the scrollup event is being triggered.
I have tracked down that the "shouldScroll" method always return true when scrolling up in my case because my container breakpoint is always higher than remaining distanc eto scroll.
As you can see from my setup, I am not scrolling on window but on a div inside a table. I hope those information are sufficients.
Cheers