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

Dynamically change auto hide delay for specific notifications #9

Open
marcus29200 opened this issue Mar 23, 2017 · 5 comments
Open
Labels
type: feature Indicates a feature or enhancement

Comments

@marcus29200
Copy link

Hi there,

I really enjoy this so far, I just wish it had this one feature! Which is to set a custom auto hide delay for each individual notification. I saw this suggestion in your "Whats Next" portion. And this would be something that would be of great use to me!

So something like this:
notifier.show({type: 'success', message: 'Hello', id: 'some_id', autoHide: 5000});
notifier.show({type: 'info', message: 'Go away fast', id: 'some_id_2', autoHide: 1000});

or even in notify:
notifier.notify('success', 'short message', 2000);

Thanks!

@dominique-mueller dominique-mueller added the type: feature Indicates a feature or enhancement label Mar 27, 2017
@mehmetgunacti
Copy link

Hi,

Thanks for such a great tool !

I was looking for the same feature. Requirement is 'error' notifications should stay until the user clicks on them. All other notifications can / should disappear after a few seconds.

Is this already included ? If not when can we expect this to be ready ?

@madmax25
Copy link

Need same flexibility.

@joebotha
Copy link

This would be very useful for us also.

shayh pushed a commit to shayh/angular-notifier that referenced this issue Apr 30, 2019
shayh pushed a commit to shayh/angular-notifier that referenced this issue Apr 30, 2019
@SanjidHaque
Copy link

Try this

this.notifierService.getConfig().behaviour.autoHide = false;
or

this.notifierService.getConfig().behaviour.autoHide = 2000;

@phil123456
Copy link

phil123456 commented Oct 1, 2020

does not work for me, no matter the value I set, they disapear at the same time

info('test',null); // 5000 being default value
info('test',10000);

my wrapper function

  info(message:string,time:number)
  {
  	let _time:number|false; // save default value
  	if(time)
		{
			_time = this.notifierService.getConfig().behaviour.autoHide;
			this.notifierService.getConfig().behaviour.autoHide = time;
		}

		this.notifierService.notify('info', message);   

		if(time)
		{
			this.notifierService.getConfig().behaviour.autoHide = _time;
		} 	
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Indicates a feature or enhancement
Projects
None yet
Development

No branches or pull requests

7 participants