Skip to content
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

Align NA handling when using updateSelectizeInput server = TRUE / FALSE #3526

Open
ismirsehregal opened this issue Oct 8, 2021 · 0 comments

Comments

@ismirsehregal
Copy link
Contributor

@ismirsehregal ismirsehregal commented Oct 8, 2021

When using updateSelectizeInput with server = TRUE NA is dropped as a choice.
Setting server = FALSE converts it to "NA".

In my eyes this is confusing and should be aligned if possible.

library(shiny)

ui <- fluidPage(
  selectizeInput("variable1", "Variable:", c("a", "b")),
  selectizeInput("variable2", "Variable:", c("a", "b"))
)

server <- function(input, output, session) {
  updateSelectizeInput(inputId = "variable1", choices = NA, server = TRUE)
  updateSelectizeInput(inputId = "variable2", choices = NA, server = FALSE)
}

shinyApp(ui, server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant