Skip to content

infinite scroll fails to stop firing on-infinite-scroll event when no more content is generated #711

Closed

Description

@shuai-zh

I wanted to use the latest ionic infinite scroll feature in my app after looking at the sample codes here:http://codepen.io/elm/pen/Becqp

However, after I actually put them into my app, it doesn't work well when no new data is returning from the server and no more new content is generated. I simulated the problem here:http://codepen.io/chocstarfish/pen/hBysf, as you can keep scolling until the number reaches 19, open your dev console to see that the loadMore function is kept being called.

What's more, I don't know why the spinning icon which used to show up when the on-infinite-scroll event is triggered seems to be lost.

Activity

  1. deflomu commented on Mar 3, 2014

    @deflomu

    I think there should be a "scroll.infiniteScrollNoMoreDataAvailable" broadcast or something similar. When this is fired the infinite scroll element should behave like the pull-to-refresh element to allow the user to manually look for more data by pulling up the list.

  2. added this to the 0.10.0 milestone on Mar 3, 2014
  3. modified the milestones: 0.10.0, on Mar 3, 2014
  4. ajoslin commented on Mar 4, 2014

    @ajoslin
    Contributor

    Just put an ng-if on your ion-infinite-scroll.

    <ion-content on-infinite-scroll="loadMore()">
      <ion-infinite-scroll ng-if="hasMoreData"></ion-infinite-scroll>
    </ion-content>
  5. shuai-zh commented on Mar 4, 2014

    @shuai-zh
    Author

    @ajoslin Thanks buddy, it really works for me.

  6. ionitron-bot commented on Sep 1, 2018

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  7. locked and limited conversation to collaborators on Sep 1, 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

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions