adopted-ember-addons / adopted-ember-addons/ember-paper
Sidenav desired behavior seems to be unavailable
- Langage dominant
- JavaScript
- Étoiles
- 879
- Forks
- 327
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I can't seem to achieve this behavior with the sidenav.
I want to set the sidenav to never lock open but allow the user to toggle it whenever they choose - and leave it open if they want. The default (initial) state is based on a media query, but the user can override this as they choose.
I don't really care if a media query has it closed below some minimum width. What I DO want and need is for the user to be able to show and hide the sidenav even if they are in a wide desktop screen. Some apps have wide tables and a user may want to fully expand the container so they can view more data. This does not seem to be possible right now. If I turn off "open lock", then all I can do is briefly toggle the sidenav. It no longer does a "push", but does an overlay and blocks the main content container. So this is no good.
When turning "lockedOpen" to false, the logic assumes you don't ever want to have the menu still showing and only want it to open until you move off the menu.
A good example of an ideal sidenav is Freshbooks, but there are many others. The user can collapse the sidenav and expand it again. They can do this even when the resolution is wide. A media query WILL still collapse the sidenav, but again... the user can toggle it as needed. The KEY here is that a user can STILL collapse the sidenav even when the screen is wide - AND leave it open. Or leave it closed. Whatever they want to do.
**Update**:
One other note.. I can ALMOST get this desired behavior by overriding the css that sets the display to none for the menu icon. When doing that, I do not set the lockedOpen to false. I leave the selector as-is. That actually works, but when I click the toggle button, nothing happens. I assume I missed some logic in the addon that controls whether or not the sidenav will actually toggle (based on ???)
If I can find that, OR... perhaps I can just use some css to block the default menu button and add my own button which can call the toggle method?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.