diff --git a/src/app/main/navbar/navbar.component.ts b/src/app/main/navbar/navbar.component.ts
index f813570e..37ed4168 100644
--- a/src/app/main/navbar/navbar.component.ts
+++ b/src/app/main/navbar/navbar.component.ts
@@ -1,10 +1,12 @@
-import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
+import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { FuseMatchMedia } from '../../core/services/match-media.service';
import { FuseNavbarService } from './navbar.service';
import { ObservableMedia } from '@angular/flex-layout';
import { FuseMainComponent } from '../main.component';
import { NavigationEnd, Router } from '@angular/router';
+import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
+import { FuseNavigationService } from '../../core/components/navigation/navigation.service';
@Component({
selector : 'fuse-navbar',
@@ -19,12 +21,14 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
@HostBinding('class.folded-open') isFoldedOpen: boolean;
@HostBinding('class.initialized') initialized: boolean;
@Input('folded') foldedByDefault = false;
+ @ViewChild(PerfectScrollbarDirective) perfectScrollbarDirective;
matchMediaWatcher: Subscription;
constructor(
private fuseMainComponentEl: FuseMainComponent,
private fuseMatchMedia: FuseMatchMedia,
+ private fuseNavigationService: FuseNavigationService,
private navBarService: FuseNavbarService,
public media: ObservableMedia,
private router: Router
@@ -32,6 +36,13 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
{
navBarService.setNavBar(this);
+ this.fuseNavigationService.onNavCollapseToggled.subscribe(() => {
+
+ setTimeout(() => {
+ this.perfectScrollbarDirective.update();
+ }, 310);
+ });
+
this.matchMediaWatcher =
this.fuseMatchMedia.onMediaChange
.subscribe((mediaStep) => {
diff --git a/src/index.html b/src/index.html
index 7ef42e29..ee0a4856 100644
--- a/src/index.html
+++ b/src/index.html
@@ -11,7 +11,7 @@
-
+