Livewire emitTo not working in Widgets
i had two table widget, and register this widgets into ViewShipmentManifest page. but when action is executed nothing happened on event
9 Replies
typical my action like this in
PendingShipOrderWidget
https://laravel-livewire.com/docs/2.x/actions#magic-actions
https://laravel-livewire.com/docs/2.x/events#event-listeners
Livewire
Actions | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Livewire
Events | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
the problem is my event not invoked
@kevariable were you ever able to figure this out? I am having the same issue
If you’re using LW3 then emitTo was replaced with dispatchTo
@awcodes thank you but I'm still on v2 of Filament and Livewire
wasn't sure. sorry.
I'm still having an issue with this. Any idea why this wouldn't be working? I'm trying to emit and event from one widget to another
I can emit an event to the same widget without issue
but I can't get anything to send to the other widget
Ok this is strange and I don't know how/why it works but I found a solution. I had to use
->id('teamNameFilter')
on the TextInput I was trying to listen to for updates, then I had to fire the emit event from JS on the widget page
and then I need these on both widgets
On the widget I am emitting the event from, teamNameUpdated
is empty with no dependencies
On the widget I am trying to send the event to, it looks like this:
I have no idea why this works, or why it doesn't work when trying to emit the event from PHP, but it worksI register the widget in the resource then working well