From b2650a336e52a45d51f90a0de8c3a771464163fa Mon Sep 17 00:00:00 2001 From: DivadNojnarg Date: Wed, 29 May 2024 17:21:38 +0200 Subject: [PATCH] fix #260 --- R/f7-inputs.R | 2 +- R/f7Button.R | 2 +- R/utils.R | 2 +- inst/examples/update_entity/app.R | 2 +- man/updateF7Entity.Rd | 2 +- tests/testthat/test-f7List.R | 2 +- vignettes/update-app.Rmd | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/f7-inputs.R b/R/f7-inputs.R index f422b251..ec5ff14c 100644 --- a/R/f7-inputs.R +++ b/R/f7-inputs.R @@ -1756,7 +1756,7 @@ createOptions <- function( f7Form <- function(id, ...) { inputs <- list(...) # All inputs must have a name + no binding - inputs <- lapply(inputs, \(input) { + inputs <- lapply(inputs, function(input) { # Test for different input types valid_inputs <- c("input", "textarea", "select") target <- NULL diff --git a/R/f7Button.R b/R/f7Button.R index 454b1369..c1874bd4 100644 --- a/R/f7Button.R +++ b/R/f7Button.R @@ -193,7 +193,7 @@ f7Segment <- function( # the segment, if not already done. btns <- list(...) if (rounded) { - btns <- lapply(btns, \(btn) { + btns <- lapply(btns, function(btn) { is_rounded <- grepl("button-round", btn$attribs$class) if (!is_rounded) { btn <- tagAppendAttributes(btn, class = "button-round") diff --git a/R/utils.R b/R/utils.R index 7cec8e85..b1a8090f 100644 --- a/R/utils.R +++ b/R/utils.R @@ -243,7 +243,7 @@ create_app_link <- function( #' @keywords internal #' @noRd change_id <- function(items, ns) { - lapply(items, \(item) { + lapply(items, function(item) { full_ns <- ns(character(0)) tmp <- strsplit(as.character(item), "\n")[[1]] outer_ns <- strsplit(full_ns, "-")[[1]][1] diff --git a/inst/examples/update_entity/app.R b/inst/examples/update_entity/app.R index c0b14421..1061acfc 100644 --- a/inst/examples/update_entity/app.R +++ b/inst/examples/update_entity/app.R @@ -44,7 +44,7 @@ app <- shinyApp( f7BlockTitle("Swiper", size = "large"), f7Swiper( id = "swiper", - lapply(1:20, \(c) { + lapply(1:20, function(c) { f7Slide( f7Card( title = sprintf("Slide %s", c) diff --git a/man/updateF7Entity.Rd b/man/updateF7Entity.Rd index b16008f9..ed527f66 100644 --- a/man/updateF7Entity.Rd +++ b/man/updateF7Entity.Rd @@ -70,7 +70,7 @@ app <- shinyApp( f7BlockTitle("Swiper", size = "large"), f7Swiper( id = "swiper", - lapply(1:20, \(c) { + lapply(1:20, function(c) { f7Slide( f7Card( title = sprintf("Slide \%s", c) diff --git a/tests/testthat/test-f7List.R b/tests/testthat/test-f7List.R index 2613f0f2..c2a9ba49 100644 --- a/tests/testthat/test-f7List.R +++ b/tests/testthat/test-f7List.R @@ -40,7 +40,7 @@ test_that("list group works", { expect_s3_class(f7ListGroup(title = "plop"), "shiny.tag") list_group <- f7ListGroup( title = "test", - lapply(1:3, \(x) f7ListItem(x)) + lapply(1:3, function(x) f7ListItem(x)) ) expect_identical(list_group$attribs$class, "list-group") }) diff --git a/vignettes/update-app.Rmd b/vignettes/update-app.Rmd index 46186f2f..a13e9777 100644 --- a/vignettes/update-app.Rmd +++ b/vignettes/update-app.Rmd @@ -865,7 +865,7 @@ There are many options to customize the `f7Swiper()` component. Note that on des ```{r, eval=TRUE, echo=FALSE} card( shinyMobile:::create_app_link( - "NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAdzgCMAnRRAVwhiLdIAoAdMAPQsAzgwEAbAJZ0BWCdIZQGATwHCAFpIjKAskTqTxcfgEpeEWo2ZbhpKOPF8IAAmf8NW3fsPG851wxwqETCzgC8zgR8YOqkpKjCiAICDFrkDABmUARwGADmkqTqLHQYkkQpaXCZ2XAAtNRQwjB1BIoQAqbmZhDmUoxKytwe2j39iirDmtp6BkY95iPKAILoTq4skuHOGQDsAApQeXDrrs6khUbb-ADK1JKo1fy4-md7N1p5RgAyUMqcPFeZ2c0AAbnQlNs9gA5KDgpTcC6kK4Rfjve6PBimF4uYE7XY3OB5eBkU54-EAIRYcRIZPJzi0qGpAEkACbXMAsVCsqD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@ -911,7 +911,7 @@ shinyApp( clickable = TRUE ) ), - lapply(1:20, \(c) { + lapply(1:20, function(c) { f7Slide( f7Card( title = sprintf("Slide %s", c)