Skip to content

Feature request: input inside menuItem #167

@adiell

Description

@adiell

Hi,
It would be great if input can be nested inside menuItem. For example:

ui <- dashboardPage(
  dashboardHeader(title = "Example"),
  dashboardSidebar(
    sidebarMenu(
      menuItem("Item1", tabName = "tab1",
               textInput("input1", "Enter text")),
      menuItem("Item2", tabName = "tab2",
               numericInput("input2", "Enter a number", 0))
    )
    ),
  dashboardBody(
    tabItems(
      tabItem("tab1", textOutput("text1")),
      tabItem("tab2", textOutput("text2"))
    )
  )
)
server <- shinyServer(function(input, output) {
    output$text1 <- renderText({"Text1"})
    output$text2 <- renderText({"Text2"})
})

shinyApp(ui = ui, server = server)

The sidebar menu is actually displayed correctly but the content of the body isn't....

Thanks,
Adiel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions