I am trying to append a tab created by renderUI to an existing tab set. Minimal example:
ui <- fluidPage(sidebarLayout(sidebarPanel(),
mainPanel(tabsetPanel(
tabPanel("static_tab"),
uiOutput('ui_tab')
))))
server <- function(input, output) {
output$ui_tab <- renderUI({
tabPanel("render_tab", p('it worked'))
})
}
shinyApp(ui = ui, server = server)
I can get an an entire tabsetPanel to render, but not an individual tab in an existing tabsetPanel.
You can use
insertTab
orappendTab
:renderUI
won't work as it creates adiv
tag - however, you need to create ali
tag.