Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Scroller gone wild #356

Closed
LiamK opened this issue Feb 5, 2015 · 3 comments
Closed

Scroller gone wild #356

LiamK opened this issue Feb 5, 2015 · 3 comments

Comments

@LiamK
Copy link

LiamK commented Feb 5, 2015

Hi --
I have been using ui-scroll and mostly it is great. However, there are a couple things that need some attention. I'm hoping someone can come up with a fix -- I don't think I'll be able to fix it myself, and that means I'd have to go back to pagination, which I'd really rather not do.

First, if I click on one of my scroll items while the datasource is still scrolling (i.e. it's in the process of requesting data from the API and updating the page) it takes me to a detail page where I can view the item. But, the datasource keeps requesting items from the API. It /never/ stops, even though I'm on another page.
This seems like a bug, although maybe there is something I am doing wrong.

The other thing is that if I have scrolled down, let's say, fifty items and then go to the detail page, when I return to the previous page (the search page) ui-scroll appears to find its way back to where I left off (that's a good thing!) by incrementally scrolling through all fifty items until it gets to the right place -- not so good. That seems really inefficient!

Any help would be very much appreciated!

Thanks,
Liam

@dhilt
Copy link
Member

dhilt commented Feb 21, 2015

The 1st issue is truly a bug. We have created an issue within our main repo: Hill30/NGScroller#64.
The temporary solution I can suggest is to block UI until the requested data has been loaded and rows have been rendered. This can be done via "is-loading" attribute.

The behaviour that was described in the 2nd issue is surely inefficient, but it is supposed to be that. If your app use cases are so that the scrolling (up + down) events are pretty often then I can recommend you to make a scroller data cache layer to reduce time needed for server responding. Here is the demo of scroller data cache implementation. In current version there is no possibility to reduce time needed for rows rendering.

@mfeingold
Copy link
Contributor

the bug is fixed in see pull request #372

@LiamK
Copy link
Author

LiamK commented Mar 17, 2015

Thanks! Appreciate it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants