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

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

Closed
shuai-zh opened this issue Mar 2, 2014 · 4 comments
Milestone

Comments

@shuai-zh
Copy link

shuai-zh commented Mar 2, 2014

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.

@deflomu
Copy link

deflomu commented Mar 3, 2014

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.

@adamdbradley adamdbradley added this to the 0.10.0 milestone Mar 3, 2014
@adamdbradley adamdbradley modified the milestones: 0.10.0, 1.0 Beta Mar 3, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Mar 4, 2014

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>

@shuai-zh
Copy link
Author

shuai-zh commented Mar 4, 2014

@ajoslin Thanks buddy, it really works for me.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

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

4 participants