components icon indicating copy to clipboard operation
components copied to clipboard

feat(SIDENAV): Possibility to have multiple sidenav at the same position

Open GregoireLgt opened this issue 1 year ago • 1 comments

Feature Description

Hi, this feature was already asked a few years ago but the issue was locked : https://github.com/angular/components/issues/1514

I find myself in the situation where I need to have multiple Sidenav positioned at the end of my viewport (so on the right of the viewport).

Is this something that can be considered for the Sidenav component ? For instance, ng-boostrap allows to do the same thing with their Offcanvas component.

Angular: 13.3.11 @angular/material: 13.3.9

Use Case

The user wants to display additional information by clicking on different buttons which always open a Sidenav on the right of the viewport

GregoireLgt avatar Jul 25 '22 12:07 GregoireLgt

EDIT : For anyone struggling with this problem, the simple solution :

Create multiple div inside my mat-drawer and add *ngIf condition for each div. Handle in the .ts the boolean value for each div so you end up having just one mat-drawer with dynamic content

GregoireLgt avatar Jul 26 '22 09:07 GregoireLgt

I have created a drawer component (Online Demo) in the Material Extensions library. You can have a try.

nzbin avatar Oct 21 '22 15:10 nzbin

Closing since this isn't supported by the Material Design spec, as far as I can tell.

crisbeto avatar May 03 '23 18:05 crisbeto

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.