Sidebar - 18.3.35 - BREAKING CHANGES - Show,Hide,Toggle methods

18.3.35
Sidebar
BREAKING CHANGES
The Show,Hide,Toggle methods are deprecated and will no longer be used.

-> Now how can I programmatically open/close a navigation sidebar?

3 Replies 1 reply marked as answer

BP Bernd Parchmann October 2, 2020 12:21 PM UTC

Hi,

found the solution for your question:

Use IsOpen / @bind-IsOpen element! It's working fine!


DA Davy October 2, 2020 12:28 PM UTC

Thanks mate! I can confirm your suggested answer is working fine.


SP Sowmiya Padmanaban Syncfusion Team October 5, 2020 11:46 AM UTC

Hi Davy,  
 
Greetings from Syncfusion support. 
 
You can open/close the sidebar component by using its isOpen property of Sidebar component instead using its Open, Hide and Toggle methods as they are deprecated from latest Volume 3 release, 2020. Refer the below code snippet of using IsOpen property in Sidebar. 
 
  <SfSidebar @ref="_sidebar" ID="sidebar" EnableGestures="false" @bind-IsOpen="@isOpen" Type=SidebarType.Auto Target="e-gridcontent"> 
        <ChildContent> 
            <h4 class="mb-10">Welcome to Sidebar</h4> 
        </ChildContent> 
    </SfSidebar> 
  public void click() 
    { 
        if(_sidebar.IsOpen) 
        { 
            isOpen = false; 
        } 
        else 
        { 
            isOpen = true; 
        } 
    } 
 
Please, download the sample from the following link. 
 
 
Currently, we have deprecated those methods of Sidebar from Volume 3 release, 2020. We will remove those methods from Sidebar source after next four consecutive Volume releases. 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer
Loader.
Up arrow icon