filament/filament
v3.2.92
11.11.1
v3.5.1
8.2.14
When using getHeaderWidgetsColumns()
with stats widgets the number of columns remains 3.
The problem is, that for stats widgets the number of columns is hardcoded into the view file:
//vendor/filament/widgets/resources/views/stats-overview-widget.blade.php
<x-filament-widgets::widget class="fi-wi-stats-overview">
<div
@if ($pollingInterval = $this->getPollingInterval())
wire:poll.{{ $pollingInterval }}
@endif
@class([
'fi-wi-stats-overview-stats-ctn grid gap-6',
'md:grid-cols-1' => $columns === 1,
'md:grid-cols-2' => $columns === 2,
'md:grid-cols-3' => $columns === 3,
'md:grid-cols-2 xl:grid-cols-4' => $columns === 4,
])
>
@foreach ($this->getCachedStats() as $stat)
{{ $stat }}
@endforeach
</div>
</x-filament-widgets::widget>
using getHeaderWidgetsColumns()
should change the number of columns (widgets per row)
Create a stat widgets and show them on the List page of a resource
https://github.com/milenmk/filament-issue
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too