angular-material-rail-drawer-plugin icon indicating copy to clipboard operation
angular-material-rail-drawer-plugin copied to clipboard

Swap between Rail, Full or Hidden

Open mcurrycl opened this issue 4 years ago • 8 comments

I'm trying to create a SideNav that has 3 modes depending on the screen size. In mobile screens it will be fully hidden until the user clicks the "menu" icon, in medium screens it will show as a rail, and in large screens it will show as a full menu.

I tried to set this up using binding for the mode, but this doesn't work as per the previous issue. The only solution that "works" is for me to create multiple sidenavs and just show or hide the one I need, but this creates formatting issues.

How can I accomplish this?

mcurrycl avatar Jul 15 '20 05:07 mcurrycl

Please bear with me. I'm trying to move this into Angular Material https://github.com/angular/components/pull/20050

I'll try and get this bug fix for you tomorrow

Jordan-Hall avatar Jul 20 '20 23:07 Jordan-Hall

Any update?

mcurrycl avatar Aug 18 '20 01:08 mcurrycl

@mcurrycl been taken a look at it Sunday. got some progress but still need a bit more time over next few days.

Sorry I've come down with an illness so just got back to my feet

Jordan-Hall avatar Aug 18 '20 10:08 Jordan-Hall

The issue here is that the directive is active when mode="rail" is present (the directive's selector) but [mode]="..." is an attribute of of the original matnav-container thingy and doesnt know the mode "rail". So as soon as you write [mode]=... it isnt anymore matching the directive's selector

uahic avatar Oct 08 '20 16:10 uahic

@uahic @Jordan-Hall any update on this?

yalamber avatar Nov 19 '20 03:11 yalamber

@yalamber unfortunately it does not seem solvable in the current way. I think Jordan created a PR on the material repository but their team has internally to discuss it. For my project I just defaulted to regular CSS tricks. It has no animations and is not the cleanest solution but for now its okay

uahic avatar Nov 19 '20 10:11 uahic

@uahic is there nay link to css tricks we can use, I am ok with not having animations for now

yalamber avatar Nov 20 '20 03:11 yalamber

Any updates or workarounds?

mathias-ewald avatar Aug 11 '22 18:08 mathias-ewald

Issue closed please read https://github.com/Jordan-Hall/angular-material-rail-drawer-plugin/issues/56

Jordan-Hall avatar Oct 03 '23 15:10 Jordan-Hall