Update toggle_input_386 on the client
update_toggle_input_386(session, inputId, label = NULL, value = NULL)
session | The |
---|---|
inputId | The id of the input object. |
label | The label to set for the input object. |
value | The value to set for the input object. |
if (interactive()) { library(shiny) library(shiny386) ui <- page_386( button_386("update", "Go!", class = "btn-lg"), toggle_input_386("toggle", "Switch", value = TRUE) ) server <- function(input, output, session) { observe(print(input$toggle)) observeEvent(input$update, { update_toggle_input_386( session, "toggle", value = !input$toggle ) }) } shinyApp(ui, server) }