Dynamically loaded Widgets do not refresh when changing filters on the page

I'm loading widgets on a page like this:
public function getWidgets(): array
    {
        $communityFilter = $this->filters['communityId'] ?? null;
        $community = Community::find($communityFilter) ?? auth()->user()->community;

        $community->load('metrics');

        return $community->metrics->map(function ($metric) {
            return MetricWidget::make([
                'headering' => $metric->title,
                'metric' => $metric,
            ]);
        })->toArray();
    }


I have a FilterAction setup to allow selecing a community. The dynamic headers I setup work, but the MetricWidgets never reload with the new widget. Is there a way to clear these and re-add them on filter change or force a refresh?
image.png
Was this page helpful?