apvarun / toastify-js

Pure JavaScript library for better notification messages
https://apvarun.github.io/toastify-js/
MIT License
2.09k stars 230 forks source link

Avoid duplicate #103

Closed siandrealves closed 2 years ago

siandrealves commented 2 years ago

I believe there's no param to avoid duplications of the same window, right? Is there any way to prevent it (user is clicking multiple times on a button and opening multiple warnings)?

(it would be a cool option for the future - request)

apvarun commented 2 years ago

Hi @siandrealves, I believe this should be done based on your use case in your custom code. As a library, implementing this would mean also adding ways to detect if the clicks were duplicate and also adding time between multiple clicks and so on. That's not the problem the package is addressing. Hope that makes sense.

peterlaws commented 1 year ago

Most other libraries have the option to stop duplicates... but you're right, this can be done via code...... But I still think it's a worthy option.