updateTimerInput {shinyDTC} | R Documentation |
updateTimerInput
Description
updateTimerInput
Usage
updateTimerInput(
session = getDefaultReactiveDomain(),
inputId,
step1 = list(),
reset = list(),
...
)
Arguments
session |
session object |
inputId |
id of the input object |
step1 |
modified values for |
reset |
modified values for |
... |
modified values for |
Value
nothing
Examples
# Example requires the use of a `shiny` app (See Vignette)
# Updates the timer UI in a `shiny` app
if (interactive()) {
library(shiny)
library(shinyDTC)
ui <- fluidPage(
timerUI("timer1"),
actionButton("update", "Update Timer UI")
)
server <- function(input, output, session) {
timerServer("timer1")
observeEvent(input$update, {
updateTimerInput(
session, "timer1",
step1 = list(label = "Advance"),
reset = list(label = "Clear"),
min = 0, max = 100, value = 10
)
})
}
shinyApp(ui, server)
}
[Package shinyDTC version 0.1.0 Index]