-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: anchorScroll doesn't work with collection-repeat #3474
Comments
Sorry, Collection-repeat should resize if data is added or removed from your array. If it does not, a If you're having trouble with that part, the forums would be a good place to ask for help, but regarding the anchor scrolling with collection-repeat, sorry, unless there's a demand large enough to warrant the decreased performance it probably wont happen. |
Hello. I am facing the same problem. and I read #3547 too. In both case looks like you are discussing about anchor scrolling to an item which is NOT in the current ScrollView? this makes obvious sense CAN NOT do scrolling because of how collection-repeat works, the item is just not in the html DOM.. and here is my question, in my case, should be able to anchor scroll to an item which is in theview (buffer) already? the test result is: only can anchor scroll to n-first rendered buffered item. but if you scroll to others item to get your scroll target be displayed ( get it into the DOM), you still cannot anchor scroll to it. (you can test this using @jasonwinshell-br 's codepen , remember changing the actual ng-repeat to collection-repeat first ). |
Type: bug
Platform: all
Type: bug
Platform: all
Type: bug
Platform: all
See this pen: http://codepen.io/jason314/pen/VYOKPx
BTW: For some reason this pen only renders in Safari and Chrome on Mac OS X, not Firefox. Can't figure out why.
using v1.0.0-rc.2 for my own static example. Same problem.
I found two problems with with using anchorScroll and collection-repeat. ng-repeat works perfectly.
I'm using an 1000 element array. Each anchor id is "item-i"
(1) Can only go to anchor that is within the item-render-buffer window
(2) If the anchor does resolve in the render buffer the scrollTop
at line 19 is a tiny number, e.g. 1. So the scrolling does not
occur
Q: How can collection-repeat be used to window into dynamically acquired data -- not a static array.
collection-repeat requires an array of static data. I don't understand how this constraint would allow collection-repeat to work with a very common use case — dynamically loading data from a server. I have a server API than can return a window [i,j] of data elements from a very large data set, let's say 10,000. I want to show a list UI that shows a 50 element range - i.e. elements i to i+49. How, if collection-repeat is bound to static data, can it be used to window against a very large data size. It seems to me that the render buffer code needs to call user-provided a user provided function to request a range of data. Am I missing something here?
The text was updated successfully, but these errors were encountered: