Skip to content

Commit

Permalink
Watch 'infiniteScrollDistance' for dynamic change of prop
Browse files Browse the repository at this point in the history
  • Loading branch information
WandersonAlves committed Nov 9, 2017
1 parent 7a69bab commit 5b43c41
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, infiniteScrollDistance }: SimpleChanges) {
if (inputPropChanged(infiniteScrollContainer) || inputPropChanged(infiniteScrollDistance)) {
this.destroyScroller();
this.setup();
}
Expand Down

0 comments on commit 5b43c41

Please sign in to comment.