zezont4
SPA Mode & custom JS
I added this code to AdminPanelProvider.php inside boot() method
but still not working
``php
\Filament\Support\Facades\FilamentView::registerRenderHook(
'panels::body.end',
fn () => "
<script>
document.addEventListener('livewire:navigated', () => {
window.HSStaticMethods.autoInit();
})
</script>"
);
also I got this error in console :
Uncaught TypeError: Cannot read properties of undefined (reading 'autoInit')
at HTMLDocument
how did you do it ?10 replies