New issue
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
Empty list of choices checkboxGroupInput #1649
Comments
Do you have a minimal repro? Does this not work for you? library(shiny)
ui <- fluidPage(checkboxGroupInput("check", "checkboxes", character(0)))
server <- function(input, output, session) {}
shinyApp(ui, server) |
It was an unintentional change in 1.0.1 that |
…r `c()` to keep backward compatibility with Shiny < 1.0.1 (fixes #1649)
@harasmussen: given that this broke backward compatibility, we also fixed this problem in the development version of Shiny just now. So if you don't want to change your code, just install Shiny from github: devtools::install_github("rstudio/shiny") As for the fact that it seems inconsistent that the default argument produces an error, I agree with you that that was less than ideal. It used to be that Thanks for the report! |
…studio#1652) * allow the `choices` argument in `checkboxGroupInput()` to be `NULL` or `c()` to keep backward compatibility with Shiny < 1.0.1 (fixes rstudio#1649) * use vapply * added one more test; reimplemented logic for checking if choice args are null # Conflicts: # NEWS.md
@bborgesr Nice! I was looking for the name/value separation :). |
Sorry to bring this back up again . I am still getting this error in year of 2019 Loading required package: shiny and it all begins with running the sample app from Rstudio . package ‘fastmap’ is not available (for R version 3.5.1) library(shiny) ui <- fluidPage( titlePanel("Old Faithful Geyser Data"), sidebarLayout(
) server <- function(input, output) { output$distPlot <- renderPlot({
}) shinyApp(ui = ui, server = server) |
I see that the latest release of shiny (V 1.0.1) change the way you are allowed to define a group of checkboxes. This change clashes with my use case of checkboxes and I just wanna check that my case has been considered at design.
I use checkboxes as a user controlled list where the user can add items (done with updateCheckboxGroupInput) and remove them again by checking and push a remove button. Think of the way you delete files in rstudio. This use case require me to initialize an empty checklist but the new release prevent me from doing that by throwing an error: "Please specify a non-empty vector for
choices
"I find my example a valid case where you have to be able to initialize a checkbox group with choice = c(). What do you think? Has this use case been considered?
Henrik
The text was updated successfully, but these errors were encountered: