how to close sidebar when clicking outside of its region

hy all,
it is possible to close a blazor sidebar when user click left button of mouse outside of Sidebar's region?

thanks a lot
Rolando

5 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team September 3, 2020 08:20 AM UTC

Hi Rolando Tonin,  
 
Greetings from Syncfusion support. 
 
In sidebar component, we have provided a CloseOnDocumentClick property. When that property is set as true, Sidebar will close, when clicking outside the sidebar region( any element in the document excluding Sidebar element and its inner content elements). 
 
Refer the below code snippet. 
 
<SfSidebar @ref="sidebar" ID="sidebar" Width="250px"  CloseOnDocumentClick="true"> 
    <ChildContent>      
        <div style="text-align: center;" class="text-content"> Sidebar </div> 
    </ChildContent> 
</SfSidebar> 
 
Refer the sample link below. 
 
 
To know more about Sidebar component, please refer the below links.   
   
   
   
   
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer

RT Rolando Tonin September 3, 2020 09:53 AM UTC

Hy Sowmiya

Now it's working as expected.

Thanks a lot for your tip.

Regards, Rolando



SP Sowmiya Padmanaban Syncfusion Team September 3, 2020 11:34 AM UTC

Hi Rolando,  
  
Most Welcome. We are happy to hear that your problem has been resolved. Please contact us, if you need any help from us. 
  
Regards,  
Sowmiya.P 



RO Rocky August 10, 2022 07:26 AM UTC

Hi All, 

How-to close three dots sort, filter select ,deselct drop-down when click outside of its region , it's closing when click agin on three dots , not closing when we click outside in sync fusion ejs grid menu 



IL Indhumathy Loganathan Syncfusion Team August 11, 2022 11:20 AM UTC

Hi Rocky,


From the explanation, we were not clear about the exact platform and components you are using at your end. Are you using the Blazor Grid component? Please confirm the platform. Whether you are trying to use a Dropdown Menu or Dropdown List component within the Grid cell?


Please share with us the code snippets or share with us the pictorial representation of your exact layout. These details would help us to prepare a similar sample at our end to assist you promptly. You can refer to the below documentation links to know more about Syncfusion components.


https://blazor.syncfusion.com/documentation/dropdown-list/getting-started


https://blazor.syncfusion.com/documentation/drop-down-menu/getting-started


https://blazor.syncfusion.com/documentation/datagrid/getting-started


Please confirm the required details and revert us back.


Regards,

Indhumathy L


Loader.
Up arrow icon