Skip to content

Commit

Permalink
Merge pull request #223 from tanho63/fix/f7slider-iconlabels
Browse files Browse the repository at this point in the history
fixes to get f7slider labels working
  • Loading branch information
DivadNojnarg authored Apr 25, 2022
2 parents a5207ce + 44c1f30 commit 48a7742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixes #215: Icon not displayed in reconnect / reload toaster. Add f7Icon deps anyway.
- Fixes #204: issue with `f7DatePicker()` and DST.
- Update CI/CD setup.
- Fixes #222: f7Slider code updated to work with the fix for #215 above.


# shinyMobile 0.9.1
Expand Down
4 changes: 2 additions & 2 deletions R/f7-inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -2021,8 +2021,8 @@ f7Slider <- function(inputId, label, min, max, value, step = 1, scale = FALSE,

labels <- if (!is.null(labels)) {
lapply(seq_along(labels), function(i) {
isF7Icon <- (grep(x = labels[[i]][[1]]$attribs$class, pattern = "f7-icons") == 1)
if (class(labels[[i]][[1]]) != "shiny.tag" || !isF7Icon) {
isF7Icon <- (grep(x = labels[[i]]$attribs$class, pattern = "f7-icons") == 1)
if (class(labels[[i]]) != "shiny.tag" || !isF7Icon) {
stop("Label must be a f7Icon.")
}
shiny::tags$div(
Expand Down

0 comments on commit 48a7742

Please sign in to comment.