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
No response
The update_dropdown_input function is not capable of resetting a dropdown_input component back to its default value (if it had no initial selection).
update_dropdown_input
dropdown_input
Providing selected = "" or selected = character(0) to shiny::updateSelectInput clears the selection (if it had a placeholder provided).
selected = ""
selected = character(0)
shiny::updateSelectInput
library(shiny) library(shiny.semantic) ui <- semanticPage( dropdown_input("dropdown", LETTERS[1:5]), actionButton("clear", "Clear") ) server <- function(input, output, session) { try_clearing <- function(value) { print(value) before <- input$dropdown update_dropdown_input(session, "dropdown", value = NA) after <- input$dropdown print(paste("before:", before, "|", "after:", after)) } observeEvent(input$clear, { try_clearing(NA) try_clearing(NA_character_) try_clearing(NULL) try_clearing("") try_clearing(character(0)) }) } shinyApp(ui, server)
I expected the dropdown_input to be reverted to its original state: no value selected.
The text was updated successfully, but these errors were encountered:
TymekDev
Successfully merging a pull request may close this issue.
Guidelines
Project Version
No response
Platform and OS Version
No response
Existing Issues
No response
What happened?
The
update_dropdown_input
function is not capable of resetting adropdown_input
component back to its default value (if it had no initial selection).Providing
selected = ""
orselected = character(0)
toshiny::updateSelectInput
clears the selection (if it had a placeholder provided).Steps to reproduce
Steps
dropdown_input
without a default valueExample
Expected behavior
I expected the
dropdown_input
to be reverted to its original state: no value selected.Attachments
No response
Screenshots or Videos
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: