Limit the waiting queue to 2 toasts
See original GitHub issueDo you want to request a feature or report a bug? feature
What is the current behavior?
When using limit
, all pending toasts will be queued. Coming after a while, toasts will start playing from the most recent to the oldest one.
What is the expected behavior?
We would like to keep a limit=1
with a queueMax=2
(property not existing at the moment), so that we aren’t spammed by toasts when coming back to the page after a while, especially since old toasts have become irrelevant by now.
We want to keep the 2 most recent notifications in the queue, thus the newest toast should remove the second oldest toast from the queue.
Would it be possible to add this new property to a container ? Or maybe add another param to ClearWaitingQueueParams
when calling toast.clearWaitingQueue
?
Thank you for considering this feature.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top GitHub Comments
It would also be interesting to disable the queue completely. In my case I would prefer that a notification sent while the limit is full got lost.
Hey @AdrienLemaire, I’ll check if this can be implemented without too much hassle.