Skip to content
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 with collection-repeat #3547

Closed
andiCR opened this issue Apr 17, 2015 · 1 comment
Closed

bug: anchorScroll with collection-repeat #3547

andiCR opened this issue Apr 17, 2015 · 1 comment

Comments

@andiCR
Copy link

andiCR commented Apr 17, 2015

Type: bug

Platform: all

Forum post reference:
http://forum.ionicframework.com/t/indexed-list-and-collection-repeat/21146
There is no support for collection-repeat using anchors. I understand that this was scratched because of performance decisions (according to this post #3474), but I do not understand how we're supposed to use collection-repeat for large lists but can't scroll quickly on them (hence making the large list inconvenient as well. Is there a workaround for creating an indexed list?

@perrygovier
Copy link
Contributor

You can still jump to a certain scroll position. If your items are 50px tall and you want to jump to the 100th item, simply jump to 5000px.

This isn't really any different than issue #3474, and the conclusion is the same. I know that's probably not what you wanted to hear, but it's not worth the inherent slowdown anchor scrolling in collection-repeat would introduce.

A more technical explanation: in order to allow anchor scrolling, we would have to parse every element in the list in to DOM elements ahead of time, index, and cache it. As a list grows, that scales very poorly. In fact, at that point it'd be faster to let the browser use its native built in efficiencies with regular scrolling.

If jumping to a px value isn't a feasible option, the most efficient way to anchor scroll that we can think of is native scrolling.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
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

2 participants