0

I have a basic shinydashboard in which I want the sidebar to be disabled when I am on the "Upload" tabpanel. Is this possible?

library(shinydashboard)
library(shiny)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(disable = TRUE),
  dashboardBody(
    tabsetPanel(
      id = 'testingDPEtab',
      tabPanel("Upload"),
      tabPanel("Explore")
    )
  )
)
server <- function(input, output) { }

shinyApp(ui, server)
Nate
  • 10,361
  • 3
  • 33
  • 40
firmo23
  • 7,490
  • 2
  • 38
  • 114
  • If by disabling you mean showing/hiding the side bar this might help https://stackoverflow.com/questions/31305930/disabling-enabling-sidebar-from-server-side. If you want disable individual widgets (or groups of widgets) this might be useful: https://stackoverflow.com/questions/48278111/disable-enable-click-on-dashboard-sidebar-in-shiny/ – Nate May 21 '19 at 14:32
  • Basically I want it to be totally removed like in my example code but only for one tabpanel. – firmo23 May 21 '19 at 14:35
  • I'm not sure how you can accomplish that, would relocating the upload tools to a [modal](https://shiny.rstudio.com/reference/shiny/0.14/modalDialog.html) work for you? that is straight forward with shiny – Nate May 21 '19 at 15:07
  • I don't understand the difference between removing the sidebar totally compared to just hiding it, as proposed by Nate. Wouldn't hiding the sidebar in one tabPanel be good enough? – TimTeaFan May 21 '19 at 20:07
  • well I was wondering if I could totally remove it. how can I hide it? for one tabpanel.This is the solution im looking for. – firmo23 May 21 '19 at 20:09

0 Answers0