caroso1222 / notyf

👻 A minimalistic, responsive, vanilla JavaScript library to show toast notifications.

Home Page:https://carlosroso.com/notyf/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] No stacking notifications

chrisleekr opened this issue · comments

First of all, this notification project is very easy to use and pretty CSS. I just started using it for my project.

I just have one feature that I want to have is, not stacking the notifications.
When there is a new notification, I want to replace the current notification and display a new one.

Workaround for this feature is using dismissAll(), but it still makes stacking notifications before dismissing an old notification.

Demo: https://jsfiddle.net/2jg0wv4m/

Is there an alternative way to replace opened notification?

Hi @caroso1222

I actually updated your code to have a new option maxStack.
Could you take a look?
#105

Thanks for bringing this to my attention, @chrisleekr. A few things come to my mind:

  • What happens when you want to launch a new notification after the max stack has been reached? does notyf show it, or dismiss it?
  • Can you please update the jsfiddle? I see it empty

@caroso1222

What happens when you want to launch a new notification after the max stack has been reached? does notyf show it, or dismiss it?

Can you please update the jsfiddle? I see it empty

  • Oh, whoops. I forgot what I wrote at that time. But doesn't really matter because PR would explain what I wanted.

Hi,

There is any method that clear all before show new notification (or a parameter)?

Thanks.