Form filters for widgets
Typed property Filament\Widgets\TableWidget::$table must not be accessed before initialization
5 Replies
When having a large page with about 12 widgets it will throw the following error when loading/reloading the page
When ignoring the error and clicking it away, the page functions as normal.
(Or setting all widgets to
isLazy = false;
)
When did this error occur? After upgrading my packages:
one of the widgets may causing something?
try to disable and enable one by one to narrow it down
I thought it would only happen sometimes, but it seems to happen randomly, even if I turn off some widgets. Even with just one widget active, if I keep refreshing the page a lot, it throws that error. When I remove all the form fields, the error goes away. If I add back only the date fields, it's fine, but when I add Select fields, the error comes back. It looks like the field isn't ready when the widgets start loading, and that's causing the crash.
are you calling something on the Select fields
like
$record
or the table
But even if i set the options to
[]
it still happens 🤔
But when i set all the widgets to isLazy = false
the page will load at once without problems. (Expected behavior)
So its like the widgets starts loading before the form fields are ready.
Widget Example getting the filters