CodeSeven / toastr

Simple javascript toast notifications
http://www.toastrjs.com
MIT License
11.9k stars 2.04k forks source link

Update a toast message if a toast is already visible #701

Open sarahmclaughlan opened 11 months ago

sarahmclaughlan commented 11 months ago

Hello

I want to be able to update an already visible toast message/content rather than displaying a new one. Say I have a list of items, and each item has an Add button. Once i click on the Add button for each item, currently every one will show a toast so if i add 10 items it will show 10 toasts of the same toast. I want to be able to update the first visible toast to say 'Multiple notifications require your attention' instead of it showing the same toast 10 times. Hope this makes sense. I do not want the preventDuplicate though as I need to change the content message instead.

Any ideas? thanks