Skip to content

Commit

Permalink
updateProgressBar: accept HTML in title
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Jan 2, 2024
1 parent 8ad572f commit 1b8dd2d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions R/progressBars.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ updateProgressBar <- function(session = getDefaultReactiveDomain(),
session$sendCustomMessage(
type = message,
message = list(
id = id, value = value,
id = id,
value = value,
percent = percent,
total = if (is.null(total)) -1 else total,
title = title,
title = as.character(title),
status = status,
commas = commas,
unit_mark = unit_mark
Expand Down
2 changes: 1 addition & 1 deletion R/sweetalert.R
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ inputSweetAlert <- function(session = getDefaultReactiveDomain(),
#' updateProgressBar(
#' session = session,
#' id = "myprogress",
#' value = i*2
#' value = i*2
#' )
#' }
#' closeSweetAlert(session = session)
Expand Down
2 changes: 1 addition & 1 deletion inst/assets/progress-bars/progress-bars-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Shiny.addCustomMessageHandler("update-progressBar-shinyWidgets", function(
el.classList.add("progress-bar-" + data.status);
}
if (data.title !== null) {
elTitle.innerText = data.title;
elTitle.innerHTML = data.title;
}
});

2 changes: 1 addition & 1 deletion inst/assets/shinyWidgets-bindings.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion man/progressSweetAlert.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b8dd2d

Please sign in to comment.