filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
19.21k stars 2.96k forks source link

Table widget on dashboard - $columnSpan = 'full' does't take affect #14579

Closed TheSoulrester closed 3 weeks ago

TheSoulrester commented 3 weeks ago

Package

filament/widgets

Package Version

v3.2

Laravel Version

v11.9

Livewire Version

3.4

PHP Version

8.2

Problem description

I had a single table widget showing on my default dashboard. I changed the column width with protected int|string|array $columnSpan = 'full'; successful to the full width.

Then, I implemented a custom blade-Template because I wanted to have Tabs in my widget.

Now, the widget only appears in a one column width. Not in full width anymore.

Bildschirmfoto 2024-10-20 um 12 10 38

I still have the columnspan = "full" in my code: https://github.com/Feuerwehr-Bamberg-Loschgruppe-1/Strichliste/blob/b2d8132dd83d2546ae642574fe448a61288f9d24/app/Filament/Widgets/MonthlyDrinksWidget.php#L17

Expected behavior

I expected that the widget would be rendered in the fulll width.

Steps to reproduce

Create a table widget and set it to full width. The widget appears in full width. Now add the public function render() and set the view to a custom blade-template Now, the widget appears as a one column widget and not in full width anymore.

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

https://github.com/Feuerwehr-Bamberg-Loschgruppe-1/Strichliste

Relevant log output

No response

Donate šŸ’° to fund this issue

Fund with Polar

github-actions[bot] commented 3 weeks ago

Hey @TheSoulrester! We're sorry to hear that you've hit this issue. šŸ’›

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

github-actions[bot] commented 3 weeks ago

Thank you for providing reproduction steps! Reopening the issue now.

TheSoulrester commented 3 weeks ago

Without public function render()

Bildschirmfoto 2024-10-20 um 12 18 05
TheSoulrester commented 3 weeks ago

I found the solution. A user give me the hint that I had to change the div to <x-filament-widgets::widget> /// </x-filament-widgets::widget>

But I didn't found this in the table widget part neither in the widget blade template.