Search code examples
rshinyshinydashboarddashboardheader

How to switch the disable (TRUE/FALSE) parameter in dashboardHeader with server-side logic?


In my shiny server function I have a variable that is set either TRUE or FALSE. I would like to use this variable to set the dashboardHeader parameter disable to TRUE or FALSE. However, I have noticed that in order to preserve the dahsboardPage layout I need to generate this in the UI.

My question is whether anybody knows about a hack to set the variable disable in Shiny's dashboardSidebar and dashboardHeader function based on a server-side variable?


Solution

  • In the comments to the question, @Bretauv suggested the answer tot he following question: shiny - how to disable the dashboardHeader

    This was helpful and I ended up resolving the issue with shinyjs as described in that answer.