Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] No stacking notifications #104

Open
chrisleekr opened this issue May 28, 2021 · 4 comments
Open

[Feature Request] No stacking notifications #104

chrisleekr opened this issue May 28, 2021 · 4 comments

Comments

@chrisleekr
Copy link

chrisleekr commented May 28, 2021

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?

@chrisleekr
Copy link
Author

Hi @caroso1222

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

@caroso1222
Copy link
Owner

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

@chrisleekr
Copy link
Author

@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.

@paulocoutinhox
Copy link

Hi,

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

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants