question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[sidenav/drawer] Dynamic width

See original GitHub issue

Bug, feature request, or proposal:

feature request

What is the expected behavior?

I expect .mat-drawer-content to change margin value after I change width on <md-drawer>

What is the current behavior?

<md-drawer> Has no API for dynamic width change

What are the steps to reproduce?

http://plnkr.co/edit/GHUPDReRi9AbQM3En3Re?p=preview

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

I want to allow my users change sidebar width while it is opened.

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

@angular/cli: 1.2.7 node: 8.2.1 os: win32 x64 @angular/animations: 5.0.0-beta.2 @angular/cdk: 2.0.0-beta.8-5e3228f @angular/common: 5.0.0-beta.2 @angular/compiler: 5.0.0-beta.2 @angular/core: 5.0.0-beta.2 @angular/flex-layout: 2.0.0-beta.8 @angular/forms: 5.0.0-beta.2 @angular/http: 5.0.0-beta.2 @angular/material: 2.0.0-beta.8-5e3228f @angular/platform-browser: 5.0.0-beta.2 @angular/platform-browser-dynamic: 5.0.0-beta.2 @angular/platform-server: 5.0.0-beta.2 @angular/router: 5.0.0-beta.2 @angular/cli: 1.2.7 @angular/compiler-cli: 5.0.0-beta.2

Is there anything else we should know?

##Does such API makes sense at all?

P.S it worked in that way in previous versions

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:10
  • Comments:5

github_iconTop GitHub Comments

2reactions
Nodariicommented, Oct 3, 2017

deal, lets track this issue there

2reactions
adrmcommented, Aug 30, 2017

I can reproduce this issue in the latest @angular/material@2.0.0-beta.10. Hope you can fix it. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dynamically set the width of main content based on ...
I made top nav bar(mat-toolbar) as fixed and width to 100vw. ... Don't use margin-left, just add autosize on the mat-sidenav-container :
Read more >
Sidenav - Angular Material
If your app requires for a drawer to change its width while it is open, you can use the autosize option to tell...
Read more >
How to change sidebar width by movable drawer with react
Get the movable drawer position, and use it to change sidebar width. It's seems to be more difficult than Resizing, but seems to...
Read more >
Autosize sidenav - StackBlitz
<mat-drawer #drawer class="example-sidenav". mode="side">. <p>Auto-resizing sidenav</p>. <p *ngIf="showFiller">Lorem, ipsum dolor. sit amet consectetur.</p>.
Read more >
How to Create a Resizable Left Navigation - Solodev
This sets the sidebar to the full height of the viewport. The vh unit uses percentages, so 100vh is 100% of the viewport....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found