Ghost/core/client/app/components/gh-infinite-scroll-box.js
Jason Williams 42166c8d9f Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00

23 lines
563 B
JavaScript

import Ember from 'ember';
import InfiniteScrollMixin from 'ghost/mixins/infinite-scroll';
import setScrollClassName from 'ghost/utils/set-scroll-classname';
export default Ember.Component.extend(InfiniteScrollMixin, {
didRender: function () {
this._super();
var el = this.$();
el.on('scroll', Ember.run.bind(el, setScrollClassName, {
target: el.closest('.content-list'),
offset: 10
}));
},
willDestroyElement: function () {
this._super();
this.$().off('scroll');
}
});