Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (43 sloc) 1.303 kB
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/update-input.R
\title{Change the selected tab on the client}
updateTabsetPanel(session, inputId, selected = NULL)
updateNavbarPage(session, inputId, selected = NULL)
updateNavlistPanel(session, inputId, selected = NULL)
\item{session}{The \code{session} object passed to function given to
\item{inputId}{The id of the \code{tabsetPanel}, \code{navlistPanel},
or \code{navbarPage} object.}
\item{selected}{The name of the tab to make active.}
Change the selected tab on the client
shinyServer(function(input, output, session) {
# TRUE if input$controller is even, FALSE otherwise.
x_even <- input$controller \%\% 2 == 0
# Change the selected tab.
# Note that the tabset container must have been created with an 'id' argument
if (x_even) {
updateTabsetPanel(session, "inTabset", selected = "panel2")
} else {
updateTabsetPanel(session, "inTabset", selected = "panel1")
\code{\link{tabsetPanel}}, \code{\link{navlistPanel}},
Jump to Line
Something went wrong with that request. Please try again.