I am trying to select a specic tabPanel dynamically in the simply Shiny app. The script of app is as follows:
ui.r
library(shiny)
shinyUI(fluidPage(
titlePanel("SCORE CARD DEVELOPMENT PLATFORM"),
navbarPage("ScoreDevApp",
tabPanel("Settings",
fluidRow(column(2,
actionButton("goButton_service", "Load saved parameters",width=200)
)
)
),
tabPanel("Download & Binning input data")
)
)
)
server.r:
library(shiny)
shinyServer(function(input, output, session) {
#load saved parameters
observeEvent(input$goButton_service, {
updateTabsetPanel(session, "ScoreDevApp", selected = "Download & Binning input data")
})
})
The idea is to press the button "goButton_service" and select the tabPanel "Download & Binning input data".
I have used the example from here R Shiny switch tabPanel when selectInput value changes .
However the tabPanel is not selected. I would be very grateful for your help :-)
See Question&Answers more detail:os