mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
committed by
Joe Cheng
parent
183e9a3d0b
commit
751e8c189e
@@ -511,6 +511,9 @@ updateCheckboxGroupInput <- function(session, inputId, label = NULL,
|
||||
#' @export
|
||||
updateRadioButtons <- function(session, inputId, label = NULL, choices = NULL,
|
||||
selected = NULL, inline = FALSE) {
|
||||
if (!is.null(choices)) choices <- as.character(choices)
|
||||
if (!is.null(selected)) selected <- as.character(selected)
|
||||
|
||||
# you must select at least one radio button
|
||||
if (is.null(selected) && !is.null(choices)) selected <- choices[[1]]
|
||||
updateInputOptions(session, inputId, label, choices, selected, inline, type = 'radio')
|
||||
|
||||
Reference in New Issue
Block a user