We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updateRadioButtons()
length(selected) > 1
When trying to send multiple values as selected in updateRadioButtons(), {shiny} doesn't throw an error, as opposed to radioButtons() alone:
selected
{shiny}
radioButtons()
Error:
library(shiny) ui <- fluidPage( radioButtons("radio", "Radios", letters, selected = letters[10:11]), actionButton("changes", "Changes") ) server <- function( input, output, session ){ observeEvent(input$changes, { updateRadioButtons(session, "radio", selected = letters[2]) }) } shinyApp(ui, server) Listening on http://127.0.0.1:7085 Warning: Error in radioButtons: The 'selected' argument must be of length 1 79: stop 78: radioButtons 70: ui [#2]
With updateRadioButtons(), no error:
library(shiny) ui <- fluidPage( radioButtons("radio", "Radios", letters, selected = letters[10]), actionButton("changes", "Changes") ) server <- function( input, output, session ){ observeEvent(input$changes, { updateRadioButtons(session, "radio", selected = letters[2:3]) }) } shinyApp(ui, server)
The text was updated successfully, but these errors were encountered:
Uncaught TypeError: e.replace is not a function
updateRadioButtons(session, "radio", selected = letters[1:5])
Successfully merging a pull request may close this issue.
When trying to send multiple values as
selected
inupdateRadioButtons()
,{shiny}
doesn't throw an error, as opposed toradioButtons()
alone:Error:
With
updateRadioButtons()
, no error:The text was updated successfully, but these errors were encountered: