Description Usage Arguments Examples
Change the value of an in-place editable input on the client
1 | updateEditableInput(session, inputId, value = NULL)
|
session |
The |
inputId |
The id of the input object. |
value |
The value to set for the input object. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
editableInput("foo", "text", ""),
actionButton("update", "Update"),
verbatimTextOutput("bar")
)
server <- function(input, output, session) {
output$bar <- renderPrint(input$foo)
observeEvent(input$update, {
updateEditableInput(session, "foo", sample(month.abb, 1))
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.