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

Flash messages not appearing after push_navigate #25

Closed
sevenseacat opened this issue Nov 11, 2024 · 5 comments
Closed

Flash messages not appearing after push_navigate #25

sevenseacat opened this issue Nov 11, 2024 · 5 comments

Comments

@sevenseacat
Copy link

I think this may be related to #9 but I'm not sure.

Code like the following in a LiveView:

socket
|> LiveToast.put_toast(:info, "Artist saved successfully")
|> push_navigate(to: ~p"/")

Won't render a toast message, as the LiveToast.LiveComponent never receives the update with the new toast (as it's been torn down and remounted after the navigate).

This is a super common pattern that needs support!

@rmand97
Copy link

rmand97 commented Nov 20, 2024

I have the same problem

@srcrip
Copy link
Owner

srcrip commented Dec 18, 2024

@sevenseacat and @rmand97 There is now a PR that aims to address this, if you'd like to test the branch in my PR that would be great!

@sevenseacat
Copy link
Author

Unfortunately I removed live_toast a while ago, as it wasn't usable to me without this feature. I hope it works though!

@srcrip
Copy link
Owner

srcrip commented Dec 19, 2024

No worries! I'll leave this issue open until #28 is merged. @sevenseacat let me know if there's anything else I can add that would enable you to use it in the future.

@srcrip
Copy link
Owner

srcrip commented Dec 27, 2024

Closing now since #28 is implemented.

@srcrip srcrip closed this as completed Dec 27, 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

3 participants