dashboardSidebar(
sidebarMenu( id="tabs",
menuItem("Stationary", tabName = "l", icon = icon("th"),
menuSubItem('LTE',
tabName = "STALTE",
icon = icon("dashboard")),
menuSubItem('UMTS',
tabName = "STAUMTS",
icon = icon("dashboard"))
)
)
)
dashboardBody(
tabItems(
tabItem(tabName = "STALTE",
fluidPage(fluidRow(verbatimTextOutput("default")
)
)
.......
.......
tabItem(tabName = "STALTE",
fluidPage(fluidRow(verbatimTextOutput("default")
))
server <- function(input, output,session){
output$default<-renderText({
if(input$tabs=='STAUMTS'){" Stationary LTE"}
else if(input$tabs=='STALTE'){" Stationary UMTS"}
else{""}
})
}
I need to change output$default based on tab selected. i want to use sidebar menu item like a radio button. I would like to stay on the tab STALTE when i click on the tab STAUMTS and see the change in output$default from Stationary LTE to Stationary UMTS. Hope it is clear..