The infinitescroll will running on-infinite
callback automatic when page loaded, How to disable it?
I just want to call it manually for the first time.
The infinitescroll will running on-infinite
callback automatic when page loaded, How to disable it?
I just want to call it manually for the first time.
@andy @Calendee I found before the nighty 1717 version, the infinitescroll will not call on-infinite function when first come to page, even though this fit my necessary, but I have not found any announce about it, so I’m wondering this will be revert in the future version.
I have created a demo here: http://codepen.io/lagoonwish/pen/fJeah
See this sample for how to make it work with the nightlies.
@Calendee, Thanks for your response, I have checked your demo, you do infinite scroll in the nightly version is to trigger the callback function manually, and so do I.
// Trigger the initial load here.
$scope.fetchAirlines()
But there are some people don’t know to call it manually because the early version is unnecessary to call it when page first load, so, I mean should we to announce this change in some places?
this pen does not appear to be working?
Seems to be working fine. What are you using ? Chrome? iOS? Firefox?
Not so sure it’s really necessary. Once it’s on the forum it’ll just drift further and further down until no one notices.
I’ve submitted a change request for the doc so that it will be more clear.
https://github.com/calendee/ionic/compare/driftyco:master...patch-1?quick_pull=1
Chrome Version 34.0.1847.116, works fine in safari
Just tried in Version 34.0.1847.116 and it’s working fine. Also in Canary and iPhone 5S with iOS 7.1
What’s not working for you?
i will try and take a screenshare, it is just not scrolling
This pen isn’t looking right for me.
It loads more content when you get to the bottom, yes, but it also replaces the content before it, and reorders everything. Something odd is going on.
Scroll down, then back up - the top isn’t the same as it started.
Should we always be using concat() to add to the previous items? Wasn’t ionic working on something that would only render the items visible, to make it not slow down with too many rows?
This is just my little sample. It’s not a “best practice” in any manner. You can use whatever logic in the controller that you like. The point is to show the functionality of “on-infinite”.
The problem with the different information on scrolling up is that the airline list was not actually sorted. So, when more data was fetched, it was not in any particular order. So, the list updates with the different sorted data. I’ve fixed it so that the controller sorts the data first.
The Ionic team is working on a true virtual scroll. I know a lot of progress has been made, but it is not ready for release.