Skip to content

Commit

Permalink
Allow changing infiniteScrollDisabled
Browse files Browse the repository at this point in the history
If infiniteScrollDisabled is changed, call setup() again to recreate the scroller.
  • Loading branch information
dylan-smith committed Nov 19, 2017
1 parent 791cfa7 commit 2d33953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/infinite-scroll.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class InfiniteScrollDirective
this.setup();
}

ngOnChanges({ infiniteScrollContainer }: SimpleChanges) {
if (inputPropChanged(infiniteScrollContainer)) {
ngOnChanges({ infiniteScrollContainer, infiniteScrollDisabled }: SimpleChanges) {
if (inputPropChanged(infiniteScrollContainer) || inputPropChanged(infiniteScrollDisabled)) {
this.destroyScroller();
this.setup();
}
Expand Down

0 comments on commit 2d33953

Please sign in to comment.