-
Notifications
You must be signed in to change notification settings - Fork 337
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
Toast height calculation bug #133
Toast height calculation bug #133
Comments
Great find, this is indeed a bug. The height of each toast is currently only measured on mount. The fix requires a bit of a refactoring, I will have a closer look when I get to it. |
Hey! Hows the progress on this @timolins ? ❤️ |
Not sure if this is appropriate, but it would be very nice if this got fixed! Thanks for an awesome lib! |
Is there a way to force recalculation of the heights? I'm getting the same issue with Edit2: .wrapper {
display: flex;
flex-direction: column;
}
.wrapper > div {
position: relative !important;
transform: translateY(0) !important;
} <Toaster containerClassName={style.wrapper} /> |
@valdrin-t Not in the current version. This should be fixed with #207. Trying to get this out soon. |
Cool! I didn't notice the PR was still open, I thought it was merged. |
this method working, however dismissing the toast will be delay, have to use toast.remove to remove the toast, thus, this will also causing the animation of remove toast gone... but for my case should be fine with this method. thanks! |
Example: https://codesandbox.io/s/react-hot-toast-responsive-position-forked-64f33?file=/src/App.js
When you use the toast ID to change one toast to another (e.g. from loading to success), sometimes the height of the toast is off. I think it's because it's not updating the height of the toast container when the content changed.
(As always, thank you for this great lib!)
The text was updated successfully, but these errors were encountered: