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

Error when using reset() on a sliderInput that was initialized was value = NULL #207

Closed
daattali opened this issue May 28, 2020 · 0 comments

Comments

@daattali
Copy link
Owner

It's not clear whether NULL should or should not be a valid value for slider inputs (rstudio/shiny#2909) but currently shiny allows it, and reset doesn't deal with it nicely.

library(shiny)

ui <- fluidPage(
  shinyjs::useShinyjs(),
  sliderInput("test", "test", min = 5, max = 10, value = NULL), 
  actionButton("reset", "reset")
)

server <- function(input, output, session) {
  observeEvent(input$reset, {
    shinyjs::reset("test")
  })
}

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