R 为给定的侧边栏菜单依次启用tabBox中的tabPanel

R 为给定的侧边栏菜单依次启用tabBox中的tabPanel,r,shiny,shinydashboard,R,Shiny,Shinydashboard,如何顺序启用给定菜单项的选项卡? 我有一个边栏菜单,如下所述,对于每个菜单栏,我在选项卡面板中有几个选项卡。假设我想在参数和设置中单击goButton时启用“创建数据包”选项卡 sidebarMenu( menuItem( "A", tabName = "CA", icon = icon("dashboard") ), menuItem( "B",

如何顺序启用给定菜单项的选项卡? 我有一个边栏菜单,如下所述,对于每个菜单栏,我在选项卡面板中有几个选项卡。假设我想在参数和设置中单击goButton时启用“创建数据包”选项卡

    sidebarMenu(
        menuItem(
          "A",
          tabName = "CA",
          icon = icon("dashboard")
        ),
        menuItem(
          "B",
          icon = icon("th"),
          tabName = "PO",
          badgeLabel = "new",
          badgeColor = "green"
        )
      )
对于菜单项CA和PO,主体是

 body <- dashboardBody( 
        tabItems(tabItem(
      tabName = "CA",
        tabBox(selected = "Parameter and Setting",
          id = "tabset1",
          width = "1000px",
          height = "650px",
          tabPanel(
            "Parameter and Setting",
            column(
              6,
              selectInput("select1", "Select the portfolio definition for analysis", c(portfolioDef$portDef))
            ),
            column(
              6,
              dateInput("date6", "Select Reporting Date:", startview = "decade")
            ),
            fluidRow(
              column(
                6,
                align = "center",
                offset = 3,
                actionButton("goButton", "Create Data Package"),
                tags$style(
                  type = 'text/css',
                  "#button { vertical-align: middle; height: 50px; width: 100%; font-size: 30px;}"
                )
              )
            )
            ),
          tabPanel("Create Data Package",
                    div(style="display:inline-block; vertical-align:top; width: 250px;",
                     selectInput("varx", "Select categorical variables for X - axis", c(catVarX$VarX))
                   ),
                   div(style="display: inline-block;vertical-align:top; width: 500px;",HTML("<br>")),
                   div(style="display:inline-block; vertical-align:top; width: 250px;",
                     selectInput("vary", "Select categorical variables for Y - axis", c(catVarY$VarY))
                   ),
                   multicolLab,
                   fluidRow(    
                     column(width = 6, radioLab),
                     column(6)
                   )
                   )
            )
            ),
        tabItem(tabName = "PO", h2(
          "Widgets tab content"
        ))))
正文