Topic: Sidenav Hide Cancel
mattybaer priority asked 3 days ago
Is there any way to cancel or stop the sidenav from being hidden in the hide.mdb.sidenav callback? Do I need to hijack the click of the backdrop and close button? I'm trying to confirm whether the user wants to close it from unsaved changes or not.
MDBootstrap staff answered 2 days ago
The hide
event does not support preventDefault
. While it is possible to write custom code to prevent closing on backdrop clicks and Esc key presses, it can be time-consuming. The Modal is a much better-suited component for this purpose compared to the Sidenav.
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 Standard
- MDB Version: MDB5 8.1.0
- Device: Any
- Browser: Any
- OS: Any
- Provided sample code: No
- Provided link: No