Update checkbox_input_386 on the client
Arguments
- session
The
session
object passed to function given toshinyServer
. Default isgetDefaultReactiveDomain()
.- inputId
The id of the input object.
- label
The label to set for the input object.
- value
Initial value (
TRUE
orFALSE
).
Examples
if (interactive()) {
library(shiny)
library(shiny386)
ui <- page_386(
button_386("update", "Go!", class = "btn-lg"),
checkbox_input_386("check", "Checked", value = TRUE)
)
server <- function(input, output, session) {
observe(print(input$check))
observeEvent(input$update, {
update_checkbox_input_386(
session,
"toggle",
value = !input$check
)
})
}
shinyApp(ui, server)
}