Update MultiSlider.shinyInput() #96
Unanswered
davide-zinghini
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Hi @davide-zinghini and thanks for your interest in shiny.blueprint! Most It's still possible to have a MultiSlider which can be updated on the server, albeit it's not that pretty. You'll need to use the underlying library(shiny.blueprint)
defaultValue <- c(3, 7)
shinyApp(
ui = Card(
reactOutput("slider"),
Button.shinyInput("reset", "Reset")
),
server = function(input, output) {
value <- reactiveVal(defaultValue)
observe(value(input$value)) |> bindEvent(input$value)
observe(value(defaultValue)) |> bindEvent(input$reset)
output$slider <- renderReact({
MultiSlider(
onChange = setInput("value"),
MultiSliderHandle(value = value()[1]),
MultiSliderHandle(value = value()[2])
)
})
}
) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone. I'm using shiny.blueprint package and it is very helpful.
I created on the UI a MultiSlider with 3 handles using the MultiSlider.shinyInput() function. If I need to update the handles value server-side, how can I do this?
For other default Shiny inputs it is easy, I can just use updateSelectInput, updateNumericInput, etc.
Thank you,
Davide
Beta Was this translation helpful? Give feedback.
All reactions