Topic: sidenav shown attribute is out of sync
I would like to react on some behavion of menu, my problem is the toggle icon has wrong position.
<mdb-side-nav
#sidenav
[fixed]="false"
>
....
<mdb-navbar
SideClass="navbar fixed-top navbar-toggleable-md navbar-expand-lg scrolling-navbar double-nav"
[containerInside]="false"
>
...
the problem I have the icon has this class applied:
.double-nav.sidenav-open {
padding-left: 15rem !important;
}
I want the icon to be left if menu is closed (1rem)
I am able to react on the state of menu by reading the "shown" property of sidenav. But there are some problems:
Expected behavior
shown is representing the state of menu shown might be even an observable, to subscribe to it
Actual behavior
shown is falsy initialy, probably null on toggle() shown does not update on first time
Resources (screenshots, code snippets etc.)
No image upload here?!
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: 11.0.0
- Device: Mac
- Browser: Firefox
- OS: Mac
- Provided sample code: No
- Provided link: No
fincha pro commented 4 years ago
maybe I am using the sidebar wrong
Arkadiusz Idzikowski staff commented 4 years ago
@fincha Thank you for reporting this problem. We need to add open/close events that will be emitted on the animation transition end. This feature should be available in the next update.