Hi all,
in the below app,
whenever the user is neither in tab2 or tab3 and clicks on refresh, the page is taking to tab1. Can we avoid this and make sure the page is staying in the respective tab post refreshing Is it possible to achieve please guide me.
library(shiny)
ui <- fluidPage(
tabsetPanel(
id="inTabset",
tabPanel("Tab 1",actionButton("switch_tab", "Go to the third tab")
),
tabPanel("Tab 2", "there!"),
tabPanel("Tab 3", "there!"))
)
server <- function(input, output, session) {
observeEvent(input$switch_tab, {
updateTabsetPanel(session, "inTabset",selected = "Tab 3")
})
}
shinyApp(ui = ui, server = server)