F
Filament14mo ago
dyo

problem with $this->emit in filament custom page

Why my $this->emit is not functioning in filament custom page.. I'm using 2 livewire in that page. i tried to trigger something to another component with emit in method.. what should i do?
3 Replies
cheesegrits
cheesegrits14mo ago
Show your code, both where you emit and listen for the events.
dyo
dyoOP14mo ago
@Hugh Messenger i called both component in the same page with
<livewire:analisis.filter-kategori-donatur>
<livewire:analisis.nominal-donasi>
<livewire:analisis.filter-kategori-donatur>
<livewire:analisis.nominal-donasi>
in nominal-donasi component
protected $listeners = [
'filter'
];

public function filter($data)
{
dd('masuk');
$this->tahun = $data['tahun'];
$this->lembaga_id = $data['lembaga'];
}
protected $listeners = [
'filter'
];

public function filter($data)
{
dd('masuk');
$this->tahun = $data['tahun'];
$this->lembaga_id = $data['lembaga'];
}
the image below is the prove that the emit is working..
No description
cheesegrits
cheesegrits14mo ago
Show the code that emits the event.
Want results from more Discord servers?
Add your server