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

Queue multiple Toasts with delay between them #304

Closed
curiousily opened this issue Jan 16, 2019 · 3 comments
Closed

Queue multiple Toasts with delay between them #304

curiousily opened this issue Jan 16, 2019 · 3 comments

Comments

@curiousily
Copy link

curiousily commented Jan 16, 2019

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Showing multiple toasts results in them displayed all at once.

What is the expected behavior?

I want to queue their entrance by adding delay.

E.g.
Toast 1 -> show now
Toast 2 -> show after 500ms
etc.

toast("I am shown now")
toast("I am shown later", {delay: 500})

Thanks for making this awesome library!

@fkhadra fkhadra self-assigned this Mar 13, 2019
@fkhadra
Copy link
Owner

fkhadra commented Mar 13, 2019

Hello @curiousily,

Sorry for the late reply. You could do this with setTimeout:

toast("I am shown now");
setTimeout(() =>toast("I am shown later"), 500);

Am I missing something ? I admit that having a property like delay is more elegant.

@fkhadra fkhadra added the How to label Mar 19, 2019
@fkhadra
Copy link
Owner

fkhadra commented Mar 21, 2019

@curiousily , So I decided to add an option to enable that. However I decided to call it wait instead of delay. What do you think about the api ?

toast('Hello', { wait: 500 })

@fkhadra fkhadra closed this as completed Mar 26, 2019
@seyyed-sina
Copy link

hi @fkhadra ,
I didn't find any 'wait' option in the api. is it still an option in v8.0.2?

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

No branches or pull requests

3 participants