Topic: closeOnClick:true closes fixed open SideNav in full screen
ales
pro
asked 6 years ago
$('.button-collapse').sideNav({ closeOnClick:true });
Now, click any of the links in the menu and the menu slides out! I wasn't expecting this behaviour. Isn't the whole purpose of fixed SideNav to stay put with enough screen estate? It closes as expected when slided in on smaller screen. closeOnClick should only be active when the SideNav was slided into the screen after hamburger press, not when sitting fixed on the left edge.
For SPA this is pretty annoying. Should I keep the state of the screen separately and show/hide the menu from my JS?
ales
pro
answered 6 years ago
Marta Wierzbicka
staff
answered 6 years ago
cdenby
pro
answered 6 years ago
Mauricio Ortensi pro commented 5 years ago
Hi cdenby! Great! It´s worked perfectly for me (I´m using MDB Pro in a SPA App with Ajax loading pages' contents). Best regards, Mauricio Ortensi, from Brazil.
Marta Wierzbicka
staff
answered 6 years ago
ales
pro
answered 6 years ago
Marta Wierzbicka
staff
answered 6 years ago
Marta Wierzbicka
staff
answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: Yes