Widgets columns not taking effect

I have the column set on the new dashboard page to 3, but nothing I do makes the 3 widgets stay on the same line.
<?php

namespace App\Filament\Pages;

class Dashboard extends \Filament\Pages\Dashboard
{

public function getColumns(): int | string | array
{
return [
'default' => 3,
'xl' => 3,
];
}


}
<?php

namespace App\Filament\Pages;

class Dashboard extends \Filament\Pages\Dashboard
{

public function getColumns(): int | string | array
{
return [
'default' => 3,
'xl' => 3,
];
}


}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class StripeDirectorySubscription extends Widget
{

protected int | string | array $columnSpan = 1;
protected static string $view = 'filament.widgets.stripe-directory-subscription';
}
<?php

namespace App\Filament\Widgets;

use Filament\Widgets\Widget;

class StripeDirectorySubscription extends Widget
{

protected int | string | array $columnSpan = 1;
protected static string $view = 'filament.widgets.stripe-directory-subscription';
}
Hope you can help.
9 Replies
Cushty
CushtyOP2w ago
Any help on this please?
Firebat
Firebat2w ago
it could be multiple things, i had the same problem, can i see how you are calling your widgets?
Firebat
Firebat2w ago
No description
No description
Firebat
Firebat2w ago
you should do it like this, if this is your desired affect i think, at least
Firebat
Firebat2w ago
GitHub
demo/app/Filament/Widgets/StatsOverviewWidget.php at main · filamen...
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
Cushty
CushtyOP2w ago
Thanks for the reply, really appreciate it, I have made my own dashboard page, as ths docs say if you want to make custom widgets you ned to do it, do I need to call the widgets in the dashboard page?
Firebat
Firebat2w ago
oh, you have your own dashboard then not the admin panel provider? if you are using a custom dashboard you will need to call them, if not they should have been automaticly discovered by the panel
Cushty
CushtyOP2w ago
how do i call them? Thanks
Firebat
Firebat2w ago
well normally when im inside of a form i do Forms\Components\Livewire::make(GastosProjetoWidget::class)->columnSpanFull(), but you can call them like a normal livewire component https://filamentphp.com/docs/3.x/widgets/adding-a-widget-to-a-blade-view
Want results from more Discord servers?
Add your server