question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clear all toast support

See original GitHub issue

We have dismissAll = () => toast.dismiss() option to clear all toasts, but structurally is it possible to include a Clear All button within the Toast-Container ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fkhadracommented, Mar 13, 2019

I’ll close this issue since I’m not gonna implement that kind of functionality. In the meantime I added a way to track the numbers of displayed toasts: https://github.com/fkhadra/react-toastify#listen-for-change

0reactions
NehaABcommented, Feb 8, 2018

It is absolutely correct. But, again if you consider a complex react-app wherein if we need to fire toasts from different components, it is difficult to maintain the toastCounter.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toast POS Customer Service and Support
If you're open, we're open. Whether it's the middle of a shift or the middle of the night, Toast is here for you....
Read more >
How to force dismiss all toast itens - MDBootstrap
Dear Mobtex, You need to use toast service clear method: constructor(private toastrService: ToastService) {}. onClick() { this.toastrService.clear(); }.
Read more >
Find and clear a toast (Toastr) - Stack Overflow
In the above code I have used toastr.clear() method which clears all toasts. Can anyone help me how to identify the toast of...
Read more >
how to clear toasts before showing a new toast
There is no API for controlling the toast after you dispatch force:showToast. You cannot clear old toasts. I just answered a similar ...
Read more >
Remove toast programmatically | React-Toastify - GitHub Pages
If you call toast.dismiss without argument, all the displayed toasts will be removed. Copy. import React ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found