widget width "$columnSpan = 'full';" doesn't work with blade-templates

I changed my table widget from filament-widget component to a blade template. Now, the $columnSpan = 'full'; doesn't work anymore and the widget appears in 1 column. How can I expand it to be fullscreen?
No description
Solution:
<x-filament-widgets::widget> <x-filament::section> .... .... </x-filament::section>...
Jump to solution
20 Replies
MikePageDev
MikePageDev2mo ago
Can we see the corasponding blade file please.
MikePageDev
MikePageDev2mo ago
Is there a reison that you changed from a filament-widget component to a blade template?
TheSoulrester
TheSoulresterOP2mo ago
because filament table widgets don't support tabs tabs seems to be only supported in table resources
MikePageDev
MikePageDev2mo ago
Oh, of course. I believe the css for 'column span' is in the widget template. I would personally convert this to a Livewire component, then call it in a custom filament widget and set the column span there. There may be a better way, but I need to look at the source code.
TheSoulrester
TheSoulresterOP2mo ago
well... my knowledge is not the best. how will i do that? Its the first time I work with laravel and filament My project would be on github: https://github.com/Feuerwehr-Bamberg-Loschgruppe-1/Strichliste maybe, you can give me some hints? 🙂
GitHub
GitHub - Feuerwehr-Bamberg-Loschgruppe-1/Strichliste
Contribute to Feuerwehr-Bamberg-Loschgruppe-1/Strichliste development by creating an account on GitHub.
MikePageDev
MikePageDev2mo ago
I can have a look latter. It might be easer for me to do a pull request so you can see what I mean. I ahve just thought of a nother option. Creat a custom widget that implements HasTable https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component
TheSoulrester
TheSoulresterOP2mo ago
would be awesome 🙂 take as many time as u need 🙂
Zen Nitiruj
Zen Nitiruj2mo ago
Have you try to put this function
public function getColumnSpan(): int | string | array
{
return [
'default' => 1,
'sm' => 2,
'md' => 2,
'lg' => 2
];
}
public function getColumnSpan(): int | string | array
{
return [
'default' => 1,
'sm' => 2,
'md' => 2,
'lg' => 2
];
}
TheSoulrester
TheSoulresterOP2mo ago
seems not to work
TheSoulrester
TheSoulresterOP2mo ago
Hey @MikePageDev did u had some tome to have a look to it? 😅
Miguel García
Miguel García2mo ago
Not what you are asking for, but just in case, an easy solution would be to add filters to the table widget since these use the table builder.
No description
TheSoulrester
TheSoulresterOP2mo ago
this was my first try but then I found the tabs which looked better. but yeah... it's a bit annoying not to use them as I wanted 😦
Miguel García
Miguel García2mo ago
Just change your view <div> container for <x-filament-widgets::widget>
Solution
Miguel García
Miguel García2mo ago
<x-filament-widgets::widget> <x-filament::section> .... .... </x-filament::section> </x-filament-widgets::widget>
Miguel García
Miguel García2mo ago
No description
TheSoulrester
TheSoulresterOP2mo ago
Thank you! This is what helped! Why isnt that in the docu? 😄
MikePageDev
MikePageDev2mo ago
I kind of is. What you have done here is convert to a Fliament custom widget
Want results from more Discord servers?
Add your server