f7ListIndex | R Documentation |
List index must be attached to an existing list view.
f7ListIndex(id, target, ..., session = shiny::getDefaultReactiveDomain())
id |
Unique id. |
target |
Related list element. CSS selector like .class, #id, ... |
... |
Other options (see https://v5.framework7.io/docs/list-index#list-index-parameters). |
session |
Shiny session object. |
For some reason, unable to get more than 1 list index working. See example below. The second list does not work.
if (interactive()) { library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "List Index", f7TabLayout( navbar = f7Navbar( title = "f7ListIndex", hairline = FALSE, shadow = TRUE ), f7Tabs( f7Tab( tabName = "List1", f7List( mode = "contacts", lapply(1:26, function(i) { f7ListGroup( title = LETTERS[i], lapply(1:26, function(j) f7ListItem(letters[j])) ) }) ) ), f7Tab( tabName = "List2", f7List( mode = "contacts", lapply(1:26, function(i) { f7ListGroup( title = LETTERS[i], lapply(1:26, function(j) f7ListItem(letters[j])) ) }) ) ) ) ) ), server = function(input, output, session) { observeEvent(TRUE, { f7ListIndex(id = "list-index-1", target = ".list") }, once = TRUE) } ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.