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

Toaster appears twice #38

Open
millerox opened this issue Sep 10, 2019 · 2 comments
Open

Toaster appears twice #38

millerox opened this issue Sep 10, 2019 · 2 comments

Comments

@millerox
Copy link

Thanks for the toast, it's really easy to use!

When a condition met, toast appears in a particular component. SemanticToastContainer is placed inside of the component. When a user navigates to another component, and then comes back and toast condition is met again, two toasters appear.

An issue can be solved, if move SemanticToastContainer to the higher hierarchy.
However, in my case, I need toast time option to be 0 (toaster do not disappear until the user clicks close icon). If I move SemanticToastContainer to the higher hierarchy, toaster stays on all the pages/components until the user closes it.

I would like the toaster to stay or until the user close it, or until the user navigate to another context . Any suggestions how it can be solved? thanks!

@andrew-mclachlan
Copy link

I tried this too but it still occurs despite being at the highest hierarchy.

@andrew-mclachlan
Copy link

andrew-mclachlan commented Jul 14, 2020

I think my issue has been resolved. My issue was not with the Toast or the container, but when it was invoked/called. I had the toast inside an event emitter that wasn't within my React's useEffect.

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

2 participants