R/toastr_clear.R

Defines functions toastr_clear_all

Documented in toastr_clear_all

#' Remove existing toastr notifications
#'
#' @param with_animation If \code{FALSE}, toasts are destroyed instantly. Else they disappear according to their \code{hideMethod}.
#'
#' @export
toastr_clear_all <- function(with_animation = FALSE) {
  session <- getSession()
  session$sendCustomMessage(
    type = 'toastr_clear',
    message = list(
      with_animation = with_animation
    )
  )
}

Try the shinytoastr package in your browser

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

shinytoastr documentation built on Aug. 31, 2023, 1:09 a.m.