updateF7App
allows to update a shinyMobile app at run time by
injecting any configuration inside the current running instance. Useful it you want
to share the same behavior across multiple elements.
Usage
updateF7App(options, session = shiny::getDefaultReactiveDomain())
Examples
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Simple Dialog",
f7SingleLayout(
navbar = f7Navbar(title = "f7Dialog"),
f7Button(inputId = "goButton", "Go!"),
f7Button(inputId = "update", "Update config")
)
),
server = function(input, output, session) {
observeEvent(input$goButton,{
f7Dialog(
title = "Dialog title",
text = "This is an alert dialog"
)
})
observeEvent(input$update,{
updateF7App(
options = list(
dialog = list(
buttonOk = "Yeaaaah!",
buttonCancel = "Ouuups!"
)
)
)
f7Dialog(
id = "test",
title = "Warning",
type = "confirm",
text = "Look at me, I have a new buttons!"
)
})
}
)
}