Components: sidenav content behind sidenav in side mode

Created on 5 Feb 2018  路  4Comments  路  Source: angular/components

Bug, feature request, or proposal:

Bug
My sidenav-content is hidden when loading sidenav elements via observable.
sidenav mode side, opened = true - see stackblitz

What is the expected behavior?

Sidenav content is placed next to sidenav - also when loading sidenav items takes some time

What is the current behavior?

sidenav elements are above sidenav-content, because they are loaded asynchronously

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-sidenav-content-hidden?file=app/app.component.ts

What is the use-case or motivation for changing an existing behavior?

I load a list of navigation elements for the sidenav via httpclient

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"@angular/animations": "^5.2.1",
"@angular/cdk": "^5.1.0",
"@angular/common": "^5.1.0",
"@angular/compiler": "^5.1.0",
"@angular/core": "^5.1.0",
"@angular/flex-layout": "^2.0.0-beta.12",
"@angular/forms": "^5.1.0",
"@angular/http": "^5.1.0",
"@angular/material": "^5.1.0",
"@angular/platform-browser": "^5.1.0",
"@angular/platform-browser-dynamic": "^5.1.0",
"@angular/router": "^5.1.0",

Is there anything else we should know?

Just ask for it :)

Most helpful comment

All 4 comments

Is there any workaround to redraw the content after my sidenav-elements have been loaded?
I tried to close and reopen the sidenav programatically but that didn't work.

Quick fix by resetting 'mode'

nav: MatSidenav
... After your container loaded/displayed
this.nav.mode = this.nav.mode

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings