It would be nice to have an option to hide the countdown progress bar without losing the auto-hide functionality. Currently my hacky workaround (below) is to pre-schedule a later::later() to teardown of the toast. If there's a clean way through the API, that would be most appreciated.
observeEvent(input$trigger, {
# 1. Define a unique tracking tag for the notification
my_toast_id <- "server_timed_toast"
# 2. Show the toast with duration_s = NULL to guarantee NO progress line elements
show_toast(
toast(
"This notification has no countdown bar and is closed by the server.",
header = "No countdown bar",
id = my_toast_id, # Explicit handle tag
duration_s = NULL # Skip the timer
)
)
# 3. Schedule the server to hide this specific toast after exactly 3 seconds
later::later(\() {
hide_toast(id = my_toast_id,session=session)
}, delay = 3)
})
It would be nice to have an option to hide the countdown progress bar without losing the auto-hide functionality. Currently my hacky workaround (below) is to pre-schedule a
later::later()to teardown of the toast. If there's a clean way through the API, that would be most appreciated.