mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
42166c8d9f
- Refactor to handle deprecations including removal of all Views, ArrayControllers, and ItemControllers.
23 lines
563 B
JavaScript
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');
|
|
}
|
|
});
|