Closed toxifiedmatrix closed 3 years ago
@toxifiedmatrix I'm guessing the reason is because, when you push to the stack, it means the modal component is now outside your main component and instead appended to the end of the page.
So emitUp won't work as there is no component around the outside of the modal. Maybe just try emit, or emitTo and specify the component name.
But I'm only guessing, if that doesn't work, can you provide your layout file, and blade files for your components so we can have a proper look?
Hope this helps!
Yes you are really a great help! just emit works perfectly, its working fine as of now, thanks alot!
👋 Oh Hi! I'm Squishy, the friendly jellyfish that manages Livewire issues.
I see this issue has been closed.
Here in the Livewire repo, we have an "issues can be closed guilt-free and without explanation" policy.
If for ANY reason you think this issue hasn't been resolved, PLEASE feel empowered to re-open it.
Re-opening actually helps us track which issues are a priority.
Reply "REOPEN" to this comment and we'll happily re-open it for you!
(More info on this philosophy here: https://twitter.com/calebporzio/status/1321864801295978497)
ddf
Description
I am successfully being able to emit up
$refresh
from the livewire child component to the livewire parent component. In this case, I have a parent component i.e. user data table and a child component i.e. user edit modal. When ever I update the user data, I emit up$refresh
, so the table refreshes and displays the updated data. But in this case I am pushing the modal to the@stack('modals')
. In this scenario, the$refresh
isn't working.Exact steps to reproduce
Push the modal to the
@stack('modals')
, as soon as I do that, I am unable to emit up$refresh
and display the updated data.Stripped-down, copy-pastable code snippets
App\Http\Livewire\UserController.php
App\Http\Livewire\Modal\UserEditModal.php
Context