Programatically dismiss custom toast
opened this issue · comments
Looking at the code implementation, the custom toast function doesn't return an id
.
Is it possible to programatically dismiss a given custom toast without an ID?
Also, if I use the toast.dismiss()
function to dismiss all active toasts, I'm getting a warning:
const renderCustomToast = () => {
toast.custom(shallowRef(MyToastComponent), { duration: Infinity })
}
const dismissToast = () => {
toast.dismiss()
}
This triggers the following warning
Vue warn]: Maximum recursive updates exceeded.
This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself.
Possible sources include component template, render function, updated hook or watcher source function.
fixed #20