# NOT RUN {
if (interactive()) {
library(shiny)
library(shinyMobile)
shiny::shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
title = "Virtual Lists",
hairline = FALSE,
shadow = TRUE
),
# main content
f7VirtualList(
id = "vlist",
rowsBefore = 2,
rowsAfter = 2,
items = lapply(1:20000, function(i) {
f7VirtualListItem(
title = paste("Title", i),
subtitle = paste("Subtitle", i),
header = paste("Header", i),
footer = paste("Footer", i),
right = paste("Right", i),
content = i,
media = img(src = "https://cdn.framework7.io/placeholder/fashion-88x88-1.jpg"),
url = NULL
)
})
)
)
),
server = function(input, output) {
}
)
# below example will not load with classic f7List
shiny::shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(
title = "Virtual Lists",
hairline = FALSE,
shadow = TRUE
),
# main content
f7List(
lapply(1:20000, function(i) {
f7ListItem(
title = paste("Title", i),
subtitle = paste("Subtitle", i),
header = paste("Header", i),
footer = paste("Footer", i),
right = paste("Right", i),
content = i,
media = NULL,
url = NULL
)
})
)
)
),
server = function(input, output) {
}
)
}
# }
Run the code above in your browser using DataLab