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
MikePageDev6d ago
Can we see the corasponding blade file please.
MikePageDev
MikePageDev6d ago
Is there a reison that you changed from a filament-widget component to a blade template?
TheSoulrester
TheSoulrester6d ago
because filament table widgets don't support tabs tabs seems to be only supported in table resources
MikePageDev
MikePageDev6d 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
TheSoulrester6d 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
MikePageDev6d 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
TheSoulrester6d ago
would be awesome 🙂 take as many time as u need 🙂
Zen Nitiruj
Zen Nitiruj6d 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
TheSoulrester6d ago
seems not to work
TheSoulrester
TheSoulrester4d ago
Hey @MikePageDev did u had some tome to have a look to it? 😅
Miguel García
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
TheSoulrester3d 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
Just change your view <div> container for <x-filament-widgets::widget>
Solution
Miguel García
<x-filament-widgets::widget> <x-filament::section> .... .... </x-filament::section> </x-filament-widgets::widget>
TheSoulrester
TheSoulrester2d ago
Thank you! This is what helped! Why isnt that in the docu? 😄
MikePageDev
MikePageDev2d 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