Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

number6's avatar

Cannot listen for Livewire events if component placed inside Filament widget

I am trying to place a Livewire component inside a Filament Widget while also using inline scripts. I have this inside my Livewire Component blade file:

@script
<script>
    console.log('started');
    document.addEventListener('livewire:init', function () {
        console.log('loaded');
    });
</script>
@endscript

It prints started but not loaded. However if I take the component and just render it on a page by itself without Filament, it does print loaded. Since Widgets build on top of Livewire components, I figured this would work out of the box, but can't get it to work.

0 likes
0 replies

Please or to participate in this conversation.