Topic: Sidenav toggle slim issue

sobis.solutions priority asked 2 years ago


Using button with id="slim-toggler" insde nav tags

<nav id="sidenav-4" class="sidenav" data-mdb-mode="side" data-mdb-slim="true" data-mdb-slim-collapsed="true" data-mdb-content="#slim-content" >

and

document.getElementById('slim-toggler').addEventListener('click', () => { slimInstance.toggleSlim(); })

Any time a category is opened and then closed, not matter if side-nav was collapsed or not it is turned into a slim version of the sidenav. How should it be managed in order to use slim-toggler inside the nav?

Snippet: https://mdbootstrap.com/snippets/standard/sobis-solutions/3469466#html-tab-view


Michał Duszak staff answered 2 years ago


Hello, I prepared a working snippet for you. See if it works for you. https://mdbootstrap.com/snippets/standard/m-duszak/3471812#js-tab-view


sobis.solutions priority answered 2 years ago


It works just fine, thank you!



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Laptop HP ZBook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: Yes
  • Provided link: Yes