Skip to content

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

Open
@tabatii

Description

@tabatii

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status

      Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions