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

Issue when creating multiple toasts in a loop #73

Open
vikramsoni2 opened this issue Jun 18, 2024 · 3 comments
Open

Issue when creating multiple toasts in a loop #73

vikramsoni2 opened this issue Jun 18, 2024 · 3 comments

Comments

@vikramsoni2
Copy link

try to run 3 toasts in a loop.

it just shows one toast and the other toasts are in html but behind the first toast, and it does not expand on hover. the first toast just moves a little bit when hovered.

@vikramsoni2 vikramsoni2 changed the title Issue when creating multiplt toasts in a loop Issue when creating multiple toasts in a loop Jun 18, 2024
@that-ambuj
Copy link

that-ambuj commented Jul 2, 2024

I also have the same issue.

@ronaldemo
Copy link

ronaldemo commented Sep 2, 2024

Use setTimeout to add interval between them. e.g.

const sleep = ms => new Promise(r => setTimeout(r, ms))
const addToasts = async (items) => {
  for (const item of items) {
    addToast(item)
    await sleep(1)
  }
}

@bw1984
Copy link

bw1984 commented Nov 4, 2024

any ideas on how this can be fixed without the timeout hack? i have the same issue and i'm showing potentially 1000s of toasts in quick succession. Adding a timeout will cause too much delay

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

No branches or pull requests

4 participants