Infinite Scrolling combined with ion-scroll issues
When using an infinite scroll along with a horizontal scroll, on-infinite keeps running and loading new data.
See codepen here http://codepen.io/mhartington/pen/Jehlz
From the forum http://forum.ionicframework.com/t/infinite-scrolling-for-horizontal-scroll/2694/3
Good catch - infinite scroll only detects vertical scroll right now; whoops :-)
Fixed!
From the commit message:
ion-infinite-scroll will now fire infinite scroll if the user scrolls past the left boundaries (if they exist) or the top boundaries (if they exists). This means infinite scroll works for vertical, horizontal, or vertical plus horizontal scrolling situations.
@ajoslin , if we have a vertically and horizontally scrollable content, on-infinite runs for both, but if we only want it to run only on vertical scrollin this is a problem. My sugestion is to have two attrs on ion-infinite-scroll like : 'not-on-horizontal' and 'not-on-vertical'
And in ionInfiniteScroll directive code:
(...) if ((maxScroll.left !== -1 && scrollValues.left >= maxScroll.left && $attrs.notOnHorizontal !=="true") || (maxScroll.top !== -1 && scrollValues.top >= maxScroll.top && $attrs.notOnVertical !=="true")) { onInfinite(); }
Do you think I should open a pull request?
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.