We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Docked sidebar closed by default

How can i show a docked sidebar closed by default?
Currently i use sidebar.Hide() on DOMContentLoaded event, but it always shows an animation while closing the sidebar after page load.

Thanks in Advance
Ralf

1 Reply

AB Ashokkumar Balasubramanian Syncfusion Team July 18, 2019 12:50 PM UTC

Hi Ralf Kley, 
  
Greetings from Syncfusion support. 
  
By default our Sidebar component type property value as Auto, so the Sidebar component will be a opened state on desktop and closed state on mobile mode. For your scenario, you can change the type property value as other than Auto (Push, Slide, Over)  to achieve your requirement. Please check the below code block. 
   
<ejs-sidebar id="dockSidebar" width="220px" dockSize="72px" enableDock="true" type="Push"> 
    <e-content-template>         
    </e-content-template> 
</ejs-sidebar> 
 
Note: isOpen property also suitable for this scenario, When the Sidebar type is set to Auto, the component will be expanded in the desktop and collapsed in the mobile mode regardless of the isOpen property. 
 
Could you please check the above provided information and get back to us, if you require any further assistance on this? 
  
Regards, 
Ashokkumar B. 


Loader.
Up arrow icon