Update a rating from the server
Usage
update_shad_rating(
id,
value = NULL,
readonly = NULL,
session = shiny::getDefaultReactiveDomain()
)Examples
if (interactive()) {
ui <- page_shad(
shad_rating("stars", "Your rating", value = 3),
shad_button("Lock rating", inputId = "lock")
)
server <- function(input, output, session) {
shiny::observeEvent(input$lock, update_shad_rating("stars", readonly = TRUE))
}
shiny::shinyApp(ui, server)
}