You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to prevent defaults. However, the way that this works now is that if we prevent defaults we don't reset the timer. I thought I could make this work by doing the following:-
var type = 'info'
var toast = (toastr[type])(header, text, config);
if (toast) {
toast.open.promise.then(function thenRefreshTimer() {
toastr.refreshTimer(toast);
});
}
However, this does not work as preventDuplicates does not retrieve the toast currently being used.
One way to solve this would be to manage my own list of toasters, but I would rather just have access to the list of toasters that is in the toastr service. I see a few solutions to my problem:-
Have toastr. return the existing toaster
Have a new option indicating what toastr should do with the duplicates (ie let them end as they do now or extend the timeout)
Reveal the full list of open toasters in the toastr service and let me work out the toaster I am interested in.
I think (2) is probably the best solution, but (3) is probably more flexible.
The text was updated successfully, but these errors were encountered:
I want to prevent defaults. However, the way that this works now is that if we prevent defaults we don't reset the timer. I thought I could make this work by doing the following:-
However, this does not work as preventDuplicates does not retrieve the toast currently being used.
One way to solve this would be to manage my own list of toasters, but I would rather just have access to the list of toasters that is in the toastr service. I see a few solutions to my problem:-
I think (2) is probably the best solution, but (3) is probably more flexible.
The text was updated successfully, but these errors were encountered: