Created
March 11, 2016 10:54
-
-
Save ilucin/149553d7745f5ca6cbcc to your computer and use it in GitHub Desktop.
Temporary hack for https://github.com/hhff/ember-infinity/issues/100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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