Prevent sidebar from closing

Hi,

This happens every time you left click on your mouse then drag to the left. Is there a way to prevent this?

Thanks.

1 Reply 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team October 1, 2020 08:22 AM UTC

Hi Cedric E  
  
Greetings from Syncfusion support.  
  
From your provided problem details, we suspect that Sidebar component is collapses due to its enableGesture property in enabled stateBy default, close event of the Sidebar will trigger, when drag the elements within Sidebar’s main-content elements from right to left side while enableGestures set to true. This functionality can be disabled in the Sidebar by setting enableGestures property as false. 
  
You can disable the enableGesture property to resolve your reported problem. 
  
Can you please ensure your reported issue resolves after disabling the gesture functionality in Sidebar?  
  
Refer the below code snippet.  
  
   
<SidebarComponent id="default-sidebar" enableGestures ={false} ref={Sidebar => this.sidebarobj = Sidebar}>  
                            <div className="title-header">  
                                <div style={{ display: 'inline-block' }}> Sidebar </div>  
                                <span id="close" className="e-icons" onClick={this.closeClick.bind(this)}></span></div>  
                            <div className="sub-title">  
                                Place your primary content here.  
                            </div>  
                        </SidebarComponent>  
  
For your reference, we have prepared a sample based on your requirement  
  
  
Refer the above sample link. If the issue still persist, could you please replicate the issue in attached sample. It will help us to resolve your issue at the earliest.  
   
Refer the below links to know more about the Sidebar component.  
  
  
  
  
Please let us know, if you need any further assistance.  
  
Regards,   
Sowmiya.P 


Marked as answer
Loader.
Up arrow icon