I have two menu items in the sidebar. Currently, if I click on any menu item the tab items for all the menu items are shown. I want to make it collapsible, if I click on multiple names menu, Single Analysis should collapse and if I click on the single analysis, multiple ones should collapse.
Current design is
The reproducible code for the same is
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Dashboard", titleWidth = 290),
dashboardSidebar(
width = 290,
sidebarMenu(
menuItem(
"Multiple Incident Analysis",
tabName = "dashboard",
icon = icon("th")),
splitLayout(cellWidths = c("44%", "31%", "25%"),
dateInput("datefrom", "Date From:", format = "mm/dd/yyyy", Sys.Date()-5),
textInput("datefrom_hour", "Hour",
value = "12:00"),
textInput("datefrom_noon","AM/PM", value = "AM")),
splitLayout(cellWidths = c("44%", "31%", "25%"),
dateInput("dateto", "Date To:", format = "mm/dd/yyyy"),
textInput("dateto_hour", "Hour",
value = "11:59"),
textInput("dateto_noon","AM/PM", value = "PM")),
menuItem("Single Analysis",
tabName = "widgets",
icon = icon("th")),
numericInput("tckt", "Ticket Number : ", 12345, width = 290),
submitButton("Submit", width = "290")
)),
dashboardBody(
))
shinyApp(ui, server)
I am not able to use the conditional panel in this.