From 2d3395331da3bed9b76e3919d05ca4914a55dc29 Mon Sep 17 00:00:00 2001 From: Dylan Smith Date: Mon, 23 Oct 2017 13:17:15 -0500 Subject: [PATCH] Allow changing infiniteScrollDisabled If infiniteScrollDisabled is changed, call setup() again to recreate the scroller. --- 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..14dd9ac2 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, infiniteScrollDisabled }: SimpleChanges) { + if (inputPropChanged(infiniteScrollContainer) || inputPropChanged(infiniteScrollDisabled)) { this.destroyScroller(); this.setup(); }