Skip to content

bug: anchorScroll with collection-repeat #3547

Closed

Description

@andiCR

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?

Activity

  1. perrygovier commented on Apr 21, 2015

    @perrygovier
    Collaborator

    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.

  2. locked and limited conversation to collaborators on Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions