Skip to content

Instantly share code, notes, and snippets.

@ilucin
Created March 11, 2016 10:54
Show Gist options
  • Save ilucin/149553d7745f5ca6cbcc to your computer and use it in GitHub Desktop.
Save ilucin/149553d7745f5ca6cbcc to your computer and use it in GitHub Desktop.
import InfinityLoaderComponent from 'ember-infinity/components/infinity-loader';
InfinityLoaderComponent.reopen({
loadingText: 'Loading data...',
loadedText: 'All data loaded.',
classNameBindings: ['infinityModel.reachedInfinity:has-reached-infinity'],
// Remove this hack when https://github.com/hhff/ember-infinity/issues/100 gets resolved
_shouldLoadMore() {
if (this.get('developmentMode') || this.isDestroying || this.isDestroyed) {
return false;
}
return this._bottomOfScrollableOffset() > this._triggerOffset();
}
});
export default InfinityLoaderComponent;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment