From open to close state and inversely

updateF7Panel(id, session = shiny::getDefaultReactiveDomain())

Arguments

id

Panel unique id. This is to access the input$id giving the panel state, namely open or closed.

session

Shiny session object.

Examples

if (interactive()) { library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "Update panel menu", f7SingleLayout( navbar = f7Navbar( title = "Single Layout", hairline = FALSE, shadow = TRUE, leftPanel = TRUE, rightPanel = TRUE ), panels = tagList( f7Panel(side = "left", id = "mypanel1", theme = "light", effect = "cover"), f7Panel(side = "right", id = "mypanel2", theme = "light") ), toolbar = f7Toolbar( position = "bottom", icons = TRUE, hairline = FALSE, shadow = FALSE, f7Link(label = "Link 1", href = "https://www.google.com"), f7Link(label = "Link 2", href = "https://www.google.com") ) ) ), server = function(input, output, session) { observe({ print( list( panel1 = input$mypanel1, panel2 = input$mypanel2 ) ) }) observe({ invalidateLater(2000) updateF7Panel(id = "mypanel1") }) } ) }