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

Not displayed after redirect from livewire component #40

Closed
willvincent opened this issue May 18, 2022 · 3 comments
Closed

Not displayed after redirect from livewire component #40

willvincent opened this issue May 18, 2022 · 3 comments

Comments

@willvincent
Copy link

Describe the bug
If a redirect is triggered from within a livewire component, the flasher output is never displayed as the request that would have triggered it originated within a livewire component, and the does not appear to be any mechanism available to delay the display until a future request in that case.

Whereas it is otherwise possible to define hops or delay stamps this does not appear to be possible from within a livewire component.

As a redirect causes a page reload, and as best I can tell presently display of flasher messages that originate within a livewire component occur as events rather than being added to the message bag in the session, the is presently no way to display a message after redirect.

To Reproduce
Steps to reproduce the behavior:

  1. Add a flasher message within a livewire component, and then redirect to a different page, observe no message displayed
  2. Add a flasher message within a livewire component and do NOT redirect, and observe message IS displayed

Expected behavior
I expect the notification to display after redirect, even if that requires me adding an extra flag when defining the message, so that for example when saving an entity and then redirecting to a list view - the save message is properly displayed.

Desktop (please complete the following information):

  • OS: macOS
  • Browser Firefox
  • Version 100
@yoeunes
Copy link
Member

yoeunes commented May 19, 2022

Hello @willvincent thanks for the details.
I just pushed the v1.0.4 which solve this redirection problem, can you check please ?

 php-flasher/flasher-laravel

@willvincent
Copy link
Author

@yoeunes That appears to have resolved this issue! Thanks :)

@yoeunes
Copy link
Member

yoeunes commented May 19, 2022

you're welcome ^^

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