F
Filamentβ€’2y ago
Mirnes

How to use Split Component

Tried like this: return $table ->schema([ Split::make([ ImageColumn::make('avatar'), TextColumn::make('name'), TextColumn::make('email'), ]) ])... But got error: Call to undefined method Filament\Resources\Table::schema()
18 Replies
toeknee
toekneeβ€’2y ago
Where are you using that? In a filament resource?
Quadrubo
Quadruboβ€’2y ago
Table doesn't have schema? this should go into the columns() method
Mirnes
MirnesOPβ€’2y ago
Yes, using it in filament resource. I also don't think table has schema, but got answer in chat channel that I should use it like that When using it in columns() it messes up table completely
LeandroFerreira
LeandroFerreiraβ€’2y ago
You can use ->from() to set the tailwind breakpoints. Take a look: https://filamentphp.com/docs/2.x/tables/layout#allowing-columns-to-stack-on-mobile
Filament
Layout - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
Dan Harrin
Dan Harrinβ€’2y ago
its probably how youre doing it
Mirnes
MirnesOPβ€’2y ago
Its clear but I asked about right way to do it πŸ™‚
Dan Harrin
Dan Harrinβ€’2y ago
well show us a screenshot of what happened
Mirnes
MirnesOPβ€’2y ago
Need 5 minutes This is table part of resource: return $table ->columns([ Tables\Columns\Layout\Split::make([
Tables\Columns\TextColumn::make('department_name'),
Tables\Columns\ToggleColumn::make('published'), ]) ]) ->filters([ // ])...
Mirnes
MirnesOPβ€’2y ago
Dan Harrin
Dan Harrinβ€’2y ago
πŸ€”
Mirnes
MirnesOPβ€’2y ago
Please don't tell me that YOU don't know what's wrong! πŸ™‚
LeandroFerreira
LeandroFerreiraβ€’2y ago
Can you show a screenshot without Split?
Mirnes
MirnesOPβ€’2y ago
LeandroFerreira
LeandroFerreiraβ€’2y ago
It works for me πŸ€”
LeandroFerreira
LeandroFerreiraβ€’2y ago
cache clear?
Mirnes
MirnesOPβ€’2y ago
cleared, still the same
LeandroFerreira
LeandroFerreiraβ€’2y ago
Did you publish some Filament view? What is the filament version? php artisan filament:upgrade ?
Mirnes
MirnesOPβ€’2y ago
installed everything this morning, didn't touch tailwind, didn't do anything out of standard work. And it's the same in each resource Thanks to @Leandro Ferreira issue is solved. Problem happens in case of combination when actions are grouped and edit/view pages are set to be modal.

Did you find this page helpful?