Cannot assign null to property App\Filament\Resources\ProductResource\Widgets\ProductStats::$tableCo
Cannot assign null to property App\Filament\Resources\ProductResource\Widgets\ProductStats::$tableColumnSearches of type array
6 Replies
Please see
https://discord.com/channels/883083792112300104/1167015843020943390
Section, how to write good question.
Without any other information this cant be answered.
Als the Error message say's your asigning Null where it needs to be a Array.
Are you using filmanet Resources/Panels or did you use a table with a custom Livewire component?
I've had the same issue with the latter - It seems widgets don't work very well with custom tables.
If not, check this https://discord.com/channels/883083792112300104/1156605444014489611
sorry Tieme and ty i will do my best
well i use admin panel
Check the last message
in that thread
well i dont use custom livewire
class ProductStats extends BaseWidget
{
use InteractsWithPageTable;
protected function getTablePage(): string
{
return ListProducts::class;
}
protected function getStats(): array
{
return [
Stat::make('Total Products', $this->getPageTableQuery()->count()),
];
}
}
do you have
ExposesTableToWidgets
?