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

Merklin's avatar

Cannot delete record when having widget on Livewire component

When having a widget on a livewire component (front-end) and I try do delete a record, I got an error:

Cannot assign null to property App\Filament\Resources\ClientResource\Widgets\ClientsStats::$tableColumnSearches of type array I have use InteractsWithPageTable; in the widget class and use ExposesTableToWidgets;

If I remove the widgets, I can execute delete without a problem.

Here is the widget code:

In the error window inside the snaphost I get

"snapshot": "{"data":{"paginators":[[],{"s":"arr"}],"tableColumnSearches":[[],{"s":"arr"}],"tableGrouping":null,"tableGroupingDirection":null,"tableFilters":null,"tableRecordsPerPage":null,"tableSearch":"","tableSortColumn":null,"tableSortDirection":null,"activeTab":null},"memo":{"id":"wTgTFfasI30Q14iQ4yo1","name":"app.filament.resources.client-resource.widgets.clients-type-stats","path":"clients","method":"GET","children":[],"scripts":[],"assets":[],"props":["paginators","tableColumnSearches","tableGrouping","tableGroupingDirection","tableFilters","tableRecordsPerPage","tableSearch","tableSortColumn","tableSortDirection","activeTab"],"errors":[],"locale":"en"},}",

In the admin panel I have no issues.

Any help appreciated.

P.S: Forgot to mention, that this happens BEFORE the confirmation modal appears i.e. when I click delete from the table actions, instead of confirmation modal I got the above error.

0 likes
0 replies

Please or to participate in this conversation.