updateF7Entity | R Documentation |
updateF7Entity
allows to update any Framework7 instance from the server.
For each entity, the list of updatable properties may significantly vary. Please
refer to the Framework7 documentation at https://v5.framework7.io/docs/.
updateF7Entity(id, options, session = shiny::getDefaultReactiveDomain())
id |
Element id. |
options |
Configuration list. Tightly depends on the entity. See https://v5.framework7.io/docs/. |
session |
Shiny session object. |
# Update action sheet instance
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Simple Dialog",
f7SingleLayout(
navbar = f7Navbar(title = "Update action sheet instance"),
f7Button(inputId = "goButton", "Go!"),
f7Button(inputId = "update", "Update config")
)
),
server = function(input, output, session) {
observeEvent(input$goButton, {
f7ActionSheet(
grid = TRUE,
id = "action1",
buttons = list(
list(
text = "Notification",
icon = f7Icon("info"),
color = NULL
),
list(
text = "Dialog",
icon = f7Icon("lightbulb_fill"),
color = NULL
)
)
)
})
observeEvent(input$update,{
updateF7Entity(
id = "action1",
options = list(
buttons = list(
list(
text = "Notification",
icon = f7Icon("info"),
color = NULL
)
)
)
)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.