Determine if sidenav is shown / actice Mode

Topic: Determine if sidenav is shown / actice Mode

twoeyes pro premium priority asked 7 months ago

Expected behavior Hi, is there a way / method to determine if the current instance of sidenav is visible (show/hide) and to determine the current mode. Calling the .show() method runs into a problem when the instance is already shown ... I'm currently using 3 sidenavs on one page ... it works - but resizing and recalculating other elements is a bit tricky.... The only way I'm currently thinking of is to trigger and store the differnet states with the coresponding event.

Actual behavior Getting informations about the current state of the sidnav

Thanks and best regards Roland

Grzegorz Bujański staff answered 7 months ago

You can use the isVisible getter to check if sidenav is visible or not. I prepared a simple snippet, maybe it will help you:

Please insert min. 20 characters.


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



Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.8.1
  • Device: PC
  • Browser: All
  • OS: Windows 11
  • Provided sample code: No
  • Provided link: No