shinyMobile
shinyMobile copied to clipboard
f7Swiper doesn't have same behavior on popup or sheet
Please see example:
library(shiny)
library(shinyMobile)
timeline <- f7Timeline(
sides = TRUE,
f7TimelineItem(
"Another text",
date = "01 Dec",
card = FALSE,
time = "12:30",
title = "Title",
subtitle = "Subtitle",
side = "left"
),
f7TimelineItem(
"Another text",
date = "02 Dec",
card = TRUE,
time = "13:00",
title = "Title",
subtitle = "Subtitle"
),
f7TimelineItem(
"Another text",
date = "03 Dec",
card = FALSE,
time = "14:45",
title = "Title",
subtitle = "Subtitle"
)
)
shiny::shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "f7Swiper"),
f7Sheet(id="examplesheet", label=NULL, orientation="bottom", swipeHandler = TRUE, swipeToStep = FALSE,swipeToClose = TRUE,closeByOutsideClick = TRUE,
f7Swiper(
id = "my-swiper",
f7Slide(
timeline
),
f7Slide(
f7Toggle(
inputId = "toggle",
label = "My toggle",
color = "pink",
checked = TRUE
),
verbatimTextOutput("test")
)
)
)
)),
server = function(input, output, session) {
output$test <- renderPrint(input$toggle)
updateF7Sheet(inputId="examplesheet", session)
}
)
}
Framework7 just went v6.0.1 yesterday. Good opportunity to update the swipper component. f7Swipper could actually be a single htmlwidget on its own so I still have to think: here is a prototype I made in another life -> https://github.com/RinteRface/swipeR.