Skip to contents

Closes the one opened under id, or every one currently showing when id is NULL – Element's close() and closeAll().

Usage

el_message_close(session = shiny::getDefaultReactiveDomain(), id = NULL)

el_notification_close(session = shiny::getDefaultReactiveDomain(), id = NULL)

Arguments

session

Shiny session; the current one by default, as for shiny::updateTextInput().

id

The id it was opened with, or NULL for all of them.

Value

Called for its side effect; returns NULL invisibly.

Examples

if (interactive()) {
  # inside a server function
  observeEvent(input$start, {
    el_notification(session, "Uploading...", duration = 0, id = "up")
  })
  observeEvent(input$done, {
    el_notification_close(session, "up")
  })
}