Skip to content

Commit

Permalink
call change detection after sidenav is reset #152
Browse files Browse the repository at this point in the history
  • Loading branch information
axtho committed Oct 9, 2017
1 parent feb2c70 commit 3d2db7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/app/viewport/view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Component,
OnDestroy,
ChangeDetectionStrategy,
ChangeDetectorRef,
AfterViewInit,
ViewChild } from '@angular/core';
import { style, state, trigger, transition, animate, keyframes } from '@angular/animations';
Expand Down Expand Up @@ -92,7 +93,8 @@ export class ViewComponent implements OnDestroy, AfterViewInit {
private _router: Router,
private _shout: ShoutService,
private _store: Store<app.AppState>,
private _titleService: TitleService) {
private _titleService: TitleService,
private cd: ChangeDetectorRef) {
this.loading$ = this._store.select(app.getLoading);
this.contextButtons$ = this._store.select(app.getContextButtons);
this.myOutstanding$ = this._store.select(app.getMyInteractions);
Expand Down Expand Up @@ -133,6 +135,7 @@ export class ViewComponent implements OnDestroy, AfterViewInit {
const size = this.drawerState === 'open' ? 220 : 75;
setTimeout(() => {
this.sidenav.open();
this.cd.detectChanges();
}, size);
}

Expand Down

0 comments on commit 3d2db7e

Please # to comment.