diff --git a/package-lock.json b/package-lock.json index 836d510..9437fb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ngx-perfect-scrollbar", - "version": "5.0.0-2", + "version": "5.0.0-3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 629318e..505d861 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Angular wrapper library for Perfect Scrollbar", "bugs": "https://github.com/zefoy/ngx-perfect-scrollbar/issues", "license": "MIT", - "version": "5.0.0-2", + "version": "5.0.0-3", "main": "bundles/ngx-perfect-scrollbar.umd.js", "module": "./dist/index.js", "typings": "./dist/index.d.ts", diff --git a/src/lib/perfect-scrollbar.directive.ts b/src/lib/perfect-scrollbar.directive.ts index eb003ce..1ab4f37 100644 --- a/src/lib/perfect-scrollbar.directive.ts +++ b/src/lib/perfect-scrollbar.directive.ts @@ -87,7 +87,7 @@ export class PerfectScrollbarDirective implements OnInit, OnDestroy, DoCheck, On changes['hidden'].previousValue = !changes['fxShow'].previousValue; } - if (changes['disabled']) { + if (changes['disabled'] && !changes['disabled'].isFirstChange()) { if (changes['disabled'].currentValue !== changes['disabled'].previousValue) { if (changes['disabled'].currentValue === true) { this.ngOnDestroy(); @@ -95,7 +95,7 @@ export class PerfectScrollbarDirective implements OnInit, OnDestroy, DoCheck, On this.ngAfterViewInit(); } } - } else if (changes['hidden']) { + } else if (changes['hidden'] && !changes['hidden'].isFirstChange()) { if (changes['hidden'].currentValue !== changes['hidden'].previousValue) { if (changes['hidden'].currentValue === false) { this.update();