Topic: Different width for side navbar and main window
twj priority asked 5 years ago
Hello,
when I change size of my screen, maximized it - sidenav automatically hides, that's ok and this is needed behavior, but I've found some options in docs for breakpoints:
.sideNav({ breakpoint: 1440 });
for example if I specify value less then 1440, sidenav hides at that breakpoint, but before that it overlays the mainscreen (main window comes bigger).
May be there are any breakpoint sets for the main window, which I can configure depending on sidenav breakpoint value?
Thanks in advance for your help!
Konrad Stępień staff answered 5 years ago
Hi @twj,
We don't have and we do not intend to add this function unless there is will demand from users.
But you can edit and customize our function how you want in mdb.js
file.
If there is anything else I could do for you do not hesitate to ask me. I'll be happy to help you.
Best, Konrad.
twj priority commented 5 years ago
Hi Konrad,
thanks for your reply, could you please tell me how to update in future, maybe some trick with overwriting existing function? Or moving this function to an external file (here I'm afraid of dependencies)? For example, if I customize mdb.js (this is the main file) and I want to update MDB to a new version, how to avoid changing code each update?
Also mdb.js is huge, it will be very helpful if you could tell me where to search for function which changes behavior when screen size changes (I'm searching for the main screen size change breakpoints).
Thanks!
Konrad Stępień staff commented 5 years ago
Hi @twj,
Propably you search MDB-Pro_4.8.7/js/modules/sidenav.js
file.
If you want to add your own function or edit MDB function, you can find it in this file.
And if you update your project probably lost this changes.
If there is anything else I could do for you do not hesitate to ask me. I will try to help you.
Regards, Konrad.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: 4.8.5
- Device: Any
- Browser: Chrome
- OS: Win 10
- Provided sample code: No
- Provided link: No