Articles in this section
Category / Section

How to disable expand or collapse on swiping in the Sidebar container

1 min read

By default, in the Sidebar control, gestures that allow you expand or collapse the sidebar container on swiping are enabled. This is used in mobile devices. You can disable this functionality by setting the enableGestures property of the Sidebar control to false. The following code snippet demonstrates how to disable expand or collapse on swiping in the sidebar container.

// Sidebar Initialization
let defaultSidebar: Sidebar = new Sidebar({
      // Disables gestures in sidebar 
      enableGestures: false
});

 

Final output

Sidebar with gestures disabled

Sample: https://stackblitz.com/edit/vapmf4-5kzvfh

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied