ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Collection Repeat + Infinite Scroll

Open perrygovier opened this issue 12 years ago • 20 comments

It appears that the spinner is hidden at the top of the page rather than at the bottom of the list when using infinite scroll with a collection repeat. We should modify the collection-repeat logic to consider siblings in its scrolling calculations.

perrygovier avatar May 13 '14 22:05 perrygovier

I'm also having this problem with infinite scroll and collection repeat. Also I don't think the scroll icon showing above the collection repeat is specific to infinite scroll because you also get the same problem with a ion-item under the collection repeat.

epelc avatar Jun 22 '14 16:06 epelc

Just to confirm if i change back to ng-repeat it works perfectly fine so this is probably just an issue with how collection-repeat shows at the bottom of an ion-list

epelc avatar Jun 22 '14 17:06 epelc

When is the fix coming? Without this fix you really can not use collection repeat directive. Infinite scroll comes naturally with collection repeat

anilsharma85175 avatar Jul 10 '14 14:07 anilsharma85175

This definitely does need to be fixed, I'll look at it within the week.

ajoslin avatar Jul 10 '14 18:07 ajoslin

@ajoslin Hi, any news? :smile:

zelphir avatar Jul 21 '14 15:07 zelphir

Fixed. collection-repeat now fits in with any other elements that are inside the ion-content.

ajoslin avatar Aug 06 '14 16:08 ajoslin

@ajoslin With the latest update collection-repeat and infinite-scroll don't work anymore. The on-infinite function is called several times (that means the all the collection-repeat items are duplicated). Had to switch back to beta.10

zelphir avatar Aug 07 '14 09:08 zelphir

@zelphir What version did it not work on? Have you tried it with beta 12? Just asking before I go and try to get it working again in my project.

epelc avatar Sep 24 '14 00:09 epelc

Works for me with beta 12.

VladimirPal avatar Sep 24 '14 04:09 VladimirPal

I'm still experiencing the hidden spinner icon, even with beta 13. There also seems to be another report on this: https://github.com/driftyco/ionic/issues/2376

naavis avatar Nov 14 '14 17:11 naavis

@naavis I also still have the same problem with beta-13

epelc avatar Nov 14 '14 17:11 epelc

I'm using beta-13 and have the same issue :(

malikov avatar Nov 19 '14 08:11 malikov

Same issue here on beta-14

JonathanWi avatar Dec 30 '14 00:12 JonathanWi

Collection Repeat + Infinite Scroll is working for me in beta 13 but it is not working in beta 14. Why is this so @ajoslin @adamdbradley?

pulakb avatar Jan 05 '15 08:01 pulakb

Any update on this issue? Since its very urgent. Thanx

vishnukhaunte avatar Jan 07 '15 13:01 vishnukhaunte

beta14 doesn't work, any hotfi?

Set2005 avatar Jan 19 '15 19:01 Set2005

+1

JWesorick avatar Oct 06 '15 13:10 JWesorick

+1

agianikas avatar Nov 20 '15 14:11 agianikas

Just tried 1.2, and for me its still not working. When loading the page, it fires loading once, and never again.

    <ion-list>
        <a class="my-item"
           collection-repeat="x in y"
           collection-item-height="240px"
           collection-item-width="200px"
           ng-href="xxx">
            <div class="card">
                <img ng-src="{{x.b}}" width="100%"><br>
                <span>
                    {{x.a}} ({{x.b}})
                </span>
            </div>
        </a>
    </ion-list>
    <ion-infinite-scroll
            icon="ion-loading-c"
            on-infinite="loadMore()"
            distance="500px">
    </ion-infinite-scroll>

Also tried distance="20%" and other values.

Screeze avatar Dec 20 '15 17:12 Screeze

Hey @Screeze, i've faced the same problem in 1.1.

What happend is @ajoslin fixed this issue adding a display:block in the element after collection-repeat (infinte-scroll, in this case), here is the link https://github.com/driftyco/ionic/issues/2376#issuecomment-76751797.

And i'd changed the css (for layout purposes) like this:

.collection-repeat-after-container {
    display: inline!important;
}

I've just removed this css and the infinite-scroll worked fine in collection repeat.

michel-eu avatar Jan 20 '16 13:01 michel-eu