R/closeAlert.R

#' Close any open shinyalert modals
#'
#' Close any shinyalert modals that are currently open. The callback functions
#' of the modal are not called when the modal is closed this way.
#' @export
closeAlert <- function() {
  session <- getSession()
  session$sendCustomMessage(type = "shinyalert.close", message = "")
  invisible(NULL)
}

Try the shinyalert package in your browser

Any scripts or data that you put into this service are public.

shinyalert documentation built on May 2, 2019, 6:35 a.m.