R/metro-update-inputs.R
updateMetroCheck.Rd
Change the value of a checkbox input on the client
updateMetroCheck(session, inputId, label = NULL, value = NULL)
session | The session object passed to function given to the server. |
---|---|
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(shinyMetroUi) shiny::shinyApp( ui = metroPage( actionButton("go", "Update checkbox"), metroCheck(inputId = "checkbox1", label = "Checkbox", labelSide = "right") ), server = function(input, output, session) { observeEvent(input$go, { updateMetroCheck(session, inputId = "checkbox1", value = TRUE) }) } ) }