Closed InfinityXTech closed 8 months ago
This is probably because the script isn't loaded on the initial page load.
Make sure the widget isn't lazy loaded.
Alternatively, lazy load the JavaScript script if you want to keep lazy loading of the widget.
Package
filament/filament
Package Version
v3.2.33
Laravel Version
10.43.0
Livewire Version
v3.4.4
PHP Version
8.2.12
Problem description
I have this custom widget:
When I call the widget with
getHeaderWidgets
widget script doesn't run at all:But when I call it directly in file:
Everything works fine.
Expected behavior
Display working widget.
Steps to reproduce
Just create custom winget, add alert script and call it in header/directly.
Reproduction repository
https://github.com/soixt/filament-custom-widget-doesnt-appear-in-header
Relevant log output
No response