EVOLUTION-MANAGER
Edit File: updateTabsetPanel.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Change the selected tab on the client</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for updateTabsetPanel {shiny}"><tr><td>updateTabsetPanel {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Change the selected tab on the client</h2> <h3>Description</h3> <p>Change the selected tab on the client </p> <h3>Usage</h3> <pre> updateTabsetPanel(session, inputId, selected = NULL) updateNavbarPage(session, inputId, selected = NULL) updateNavlistPanel(session, inputId, selected = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>session</code></td> <td> <p>The <code>session</code> object passed to function given to <code>shinyServer</code>.</p> </td></tr> <tr valign="top"><td><code>inputId</code></td> <td> <p>The id of the <code>tabsetPanel</code>, <code>navlistPanel</code>, or <code>navbarPage</code> object.</p> </td></tr> <tr valign="top"><td><code>selected</code></td> <td> <p>The name of the tab to make active.</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="tabsetPanel.html">tabsetPanel()</a></code>, <code><a href="navlistPanel.html">navlistPanel()</a></code>, <code><a href="navbarPage.html">navbarPage()</a></code> </p> <h3>Examples</h3> <pre> ## Only run examples in interactive R sessions if (interactive()) { ui <- fluidPage(sidebarLayout( sidebarPanel( sliderInput("controller", "Controller", 1, 3, 1) ), mainPanel( tabsetPanel(id = "inTabset", tabPanel(title = "Panel 1", value = "panel1", "Panel 1 content"), tabPanel(title = "Panel 2", value = "panel2", "Panel 2 content"), tabPanel(title = "Panel 3", value = "panel3", "Panel 3 content") ) ) )) server <- function(input, output, session) { observeEvent(input$controller, { updateTabsetPanel(session, "inTabset", selected = paste0("panel", input$controller) ) }) } shinyApp(ui, server) } </pre> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>