Learn R Programming

shinyMobile (version 0.7.0)

updateF7Fab: Change the value of a f7Fab input on the client

Description

Change the value of a f7Fab input on the client

Usage

updateF7Fab(inputId, label = NULL, session = shiny::getDefaultReactiveDomain())

Arguments

inputId

The id of the input object.

label

The label to set for the input object.

session

The Shiny session object, usually the default value will suffice.

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(shinyMobile)

 ui <- f7Page(
   f7SingleLayout(
    navbar = f7Navbar(title = "updateF7Fab"),
    f7Fab("trigger", "Click me")
   )
 )

 server <- function(input, output, session) {
   observeEvent(input$trigger, {
     updateF7Fab("trigger", label = "Don't click me")
   })
 }
shinyApp(ui, server)
}
# }

Run the code above in your browser using DataLab