From 5b43c41fca2d96fae3a26444075908afb5a34f65 Mon Sep 17 00:00:00 2001 From: Wanderson Alves Date: Thu, 9 Nov 2017 09:29:49 -0300 Subject: [PATCH] Watch 'infiniteScrollDistance' for dynamic change of prop --- src/modules/infinite-scroll.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/infinite-scroll.directive.ts b/src/modules/infinite-scroll.directive.ts index 0cea3867..3de1ec5f 100644 --- a/src/modules/infinite-scroll.directive.ts +++ b/src/modules/infinite-scroll.directive.ts @@ -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(); }