У меня есть страница ReportDashboard с DepartmentFilter и виджетом «Несколько таблиц», я выберу один.
В ReportDashboard я объявляю виджеты:
Код: Выделить всё
protected function getHeaderWidgets(): array
{
$departments = $this->getDepartments();
return [
DepartmentFilter::make(['departments' => $departments]),
BrokersResults::make(['departments' => $departments]),
];
}
private function getDepartments(): array
{
return Cache::remember('department-list', now()->addDay(), static fn() => User::query()->get();
}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79342530/filament-dispatching-events-from-widget-to-another-table-widget-old-state[/url]