Im building a shiny app. when I include a conditionalPanel in my sideBar menu, I no longer see anything in my Dashboard body. Here is my code:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title="TEST"),
dashboardSidebar(
sidebarMenu(
menuItem("tab1", tabName="tab_number1", icon=icon("arrow-right"),
conditionalPanel("input.sidebar==='tab_number1",
selectInput(inputId="selection",label = "Select country:",choices ="", selected=NULL))
)
)
),
## Body content
dashboardBody(
tabItems(
#intro tab
tabItem(tabName="tab_number1",
fluidPage(
fluidRow(
h2("This text should appear here!!"),
uiOutput("up"),
plotOutput(outputId="plotnumber1"),br(),
))
)
)
)
)
server <- function(input, output) {
}
shinyApp(ui, server=server)
When I click in tab1 I don't see the text that I have in the dashboardBody. If I remove the conditional Panel in the sidebarMenu I am able to see the text.
Any ideas of what im doing wrong?