Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The function getColumns() in a custom dashboard is not working #15464

Open
tabatii opened this issue Jan 29, 2025 · 0 comments
Open

The function getColumns() in a custom dashboard is not working #15464

tabatii opened this issue Jan 29, 2025 · 0 comments
Labels

Comments

@tabatii
Copy link

tabatii commented Jan 29, 2025

Package

filament/filament

Package Version

v3.2.135

Laravel Version

v11.41.0

Livewire Version

v.3.5.12

PHP Version

8.2.9

Problem description

I have specified 3 columns in the function getColumns() but my widgets still showing in a 2 columns layout
The function getColumns() in a custom dashboard does not work if my widgets are not discovered
I'm using this line in my widget class to prevent the widgets from showing on other dashboards
protected static bool $isDiscovered = false;
Apparently when i remove this line from the widgets the function getColumns() starts working as expected

Expected behavior

Expect the dashboard to have 3 columns instead of 2

Steps to reproduce

Clone the repo
Migrate the database php artisan migrate
Create a filament user php artisan make:filament-user
Login to the dashboard
You will see that the widgets are showing in a 2 columns layout even when i specify 3 columns in the function getColumns() in my custom dashboard class App\Filament\Pages\Dashboard

Reproduction repository (issue will be closed if this is not valid)

https://github.com/tabatii/filament-dashboard-columns-bug

Relevant log output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant