Re-size the Widgets Card to 3 Column/Grid
Basically i dont want the Widgets to take full space above the Table . I did try using getHeaderWidgets() but no luck
11 Replies
This is what's inside my ListCustomer.php
and this is what inside my StatsOverview.php
what i want is something like this but only have 1 cards instead of the other 2 more
Did you try defining:
protected function getHeaderWidgetsColumns(): int|array
{
return 3;
}
inside ListCustomers?yes i did try that , but nothing changed. this is what i did
Try to define this in CustomerStats widget:
protected int|string|array $columnSpan = 1;
i think StatsWidgets by default is 'full'awesome! , it does the work . I guess by default it's set to "full" .
yeah, if it extends StatsOverviewWidget, because then it says that every card create extra column i think
oh there's something different happened when i remove the getHeaderWidgetsColumns(): code
you can notice that the column somehow does something like span into 2 out of 3 columns
its cause by default it is 2:
protected function getHeaderWidgetsColumns(): int | string | array
{
return 2;
}
see Filament\Pages\Page.phpohh.. go it! thanks!