timolins / react-hot-toast

Smoking Hot React Notifications 🔥
https://react-hot-toast.com
MIT License
9.44k stars 309 forks source link

Dismiss toast by matching toastIds with regex #327

Open siddiquiaffan opened 8 months ago

siddiquiaffan commented 8 months ago

Right now, we can dismiss a toast by using toast.dismiss() and providing the toastId.

I propose adding regex matching functionality to toast.dismiss(). This way, we'd be able to pass a regex pattern to toast.dismiss() and it would dismiss all the toasts whose ids match that regex pattern.