Bug
My sidenav-content is hidden when loading sidenav elements via observable.
sidenav mode side, opened = true - see stackblitz
Sidenav content is placed next to sidenav - also when loading sidenav items takes some time
sidenav elements are above sidenav-content, because they are loaded asynchronously
https://stackblitz.com/edit/angular-material2-issue-sidenav-content-hidden?file=app/app.component.ts
I load a list of navigation elements for the sidenav via httpclient
"@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",
Just ask for it :)
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.
You can add autosize to your sidenav container: https://stackblitz.com/edit/angular-material2-issue-sidenav-content-hidden-ma7wse?file=app/app.component.html
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._
Most helpful comment
You can add
autosizeto your sidenav container: https://stackblitz.com/edit/angular-material2-issue-sidenav-content-hidden-ma7wse?file=app/app.component.html