Learn R Programming

shinyMobile (version 0.7.0)

updateF7Fabs: Toggle f7Fabs on the server side.

Description

Toggle f7Fabs on the server side.

Usage

updateF7Fabs(inputId, session = shiny::getDefaultReactiveDomain())

Arguments

inputId

The id of 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)

 shiny::shinyApp(
  ui = f7Page(
    title = "Update f7Fabs",
    init = f7Init(theme = "light", skin = "ios"),
    f7SingleLayout(
      navbar = f7Navbar(title = "Update f7Fabs"),
      f7Button("toggleFabs", "Toggle Fabs"),
      f7Fabs(
        position = "center-center",
        id = "fabs",
        lapply(1:3, function(i) f7Fab(inputId = i, label = i))
      )
    )
  ),
  server = function(input, output, session) {
    observe(print(input$fabs))
    observeEvent(input$toggleFabs, {
      updateF7Fabs(
        inputId = "fabs"
      )
    })
  }
 )
}
# }

Run the code above in your browser using DataLab