From 58feeb330c0a0bb9f24c4fc2c29821810d36bd34 Mon Sep 17 00:00:00 2001 From: Janne Julkunen Date: Mon, 25 Sep 2017 12:35:21 +0300 Subject: [PATCH 1/2] Fixed disabled attribute causing double scrollbars --- src/lib/perfect-scrollbar.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/perfect-scrollbar.directive.ts b/src/lib/perfect-scrollbar.directive.ts index 62a653c..60f829e 100644 --- a/src/lib/perfect-scrollbar.directive.ts +++ b/src/lib/perfect-scrollbar.directive.ts @@ -102,7 +102,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(); @@ -110,7 +110,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(); From 4cbb7083c9e6b6ed38c8d5754397022e7bdb3a50 Mon Sep 17 00:00:00 2001 From: Janne Julkunen Date: Mon, 25 Sep 2017 12:35:40 +0300 Subject: [PATCH 2/2] Bumped up the version for new release --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9d03d1b..7080b86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ngx-perfect-scrollbar", - "version": "4.6.4", + "version": "4.6.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5060623..c477a83 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": "4.6.4", + "version": "4.6.5", "main": "bundles/ngx-perfect-scrollbar.umd.js", "module": "./dist/index.js", "typings": "./dist/index.d.ts",