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

[Bug] Elements don't respect stacked layout in ToastContainer #1174

Open
ratasorin opened this issue Nov 14, 2024 · 0 comments
Open

[Bug] Elements don't respect stacked layout in ToastContainer #1174

ratasorin opened this issue Nov 14, 2024 · 0 comments

Comments

@ratasorin
Copy link

ratasorin commented Nov 14, 2024

I would like to report a bug in the current implementation of the stacked toasts:

I have a ToastContainer with the following config:

<ToastContainer
	position="top-right"
	autoClose={10_000}
	closeOnClick
	pauseOnFocusLoss
	draggable
	pauseOnHover
	limit={3}
	stacked
	theme={theme}
/>

And for this test I use a periodic dispatcher of toasts:

useEffect(() => {
  let counter = 0;
  setInterval(() => {
	toast(`No ${counter}. This is notification number: ${counter}`, { hideProgressBar: true });
	counter++;
  }, 1000);
}, []);

The result is illustrated in the following video:
demo

Here is also a codesandbox:
https://codesandbox.io/p/sandbox/gdp6cq

When a toast is closed (regardless of method: user action/expiration time) and a new toast is added from a queue (imposed by the limit=3 prop) it feels like they do not respect the stacked property of ToastContainer

@ratasorin ratasorin changed the title [Toasts Stack] Elements don't respect stacked property in ToastContainer [Toasts Stack] Elements don't respect stacked layout in ToastContainer Nov 14, 2024
@ratasorin ratasorin changed the title [Toasts Stack] Elements don't respect stacked layout in ToastContainer [Bug] Elements don't respect stacked layout in ToastContainer Nov 14, 2024
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

1 participant