title: Hide and show sidebar panel in shiny
body: <p>My shiny app has 3 tabPanel in mainPanel, each tabPanel has their own sidebarPanel. I use shinyBS to set sidebarPanel "show and Hide"</p>
  
  <pre><code>bsButton("showpanel", "Show/Hide sidebar",icon = icon("toggle-off"), type = "toggle",style = "info", value = TRUE)
  </code></pre>
  
  <p>In server </p>
  
  <pre><code>observeEvent(input$showpanel, {
       if(input$showpanel == TRUE) {
        removeCssClass("Main", "col-sm-12")
        addCssClass("Main", "col-sm-8")
        shinyjs::show(id = "Sidebar")
        shinyjs::enable(id = "Sidebar")
      }
      else {
        removeCssClass("Main", "col-sm-8")
        addCssClass("Main", "col-sm-12")
        shinyjs::hide(id = "Sidebar")
      }
    })
  </code></pre>
  
  <p>I test couple times, 2 tabs work like I expected, but the tab with plots (I use plotly), it appears hiding sidebar but the plots are not automatic stretching out until I click the other tab and go back Plot tab. So if I want to see the plots with full screen, I need to do extra by clicking another tab, and come back. </p>
  
  <p>How do I fix this issue? </p>
  
  <p>Thanks</p>