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.