Display the table correctly on Mobile and Desktop

I'm using Filament version 3 and I need to create two layouts with Table Builder. One for the desktop, which will be the traditional layout, and the other for mobile, which will use Split to group the columns. The problem is that I used the code below, and both the desktop and mobile layouts ended up with the same mobile layout. Could someone please help me and tell me if I did it or how to do it to make it work?
public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('name') ->label('Área') ->searchable() ->sortable() ->visibleFrom('md') ->limit(30), Tables\Columns\TextColumn::make('departament.name') ->label('Departamento') ->searchable() ->sortable() ->visibleFrom('md') ->limit(30), Tables\Columns\TextColumn::make('email') ->label('E-mail') ->searchable() ->sortable() ->visibleFrom('md') ->limit(30), Tables\Columns\ToggleColumn::make('status') ->label('Status') ->visibleFrom('md') ->sortable(), Split::make([ Tables\Columns\TextColumn::make('name') ->label('Área') ->searchable() ->sortable() ->limit(30), Tables\Columns\TextColumn::make('departament.name') ->label('Departamento') ->searchable() ->sortable() ->limit(30), Tables\Columns\TextColumn::make('email') ->label('E-mail') ->searchable() ->sortable() ->limit(30), Tables\Columns\ToggleColumn::make('status') ->label('Status') ->sortable(),
])->from('md'), ])
No description
No description
9 Replies
joao nivaldo
joao nivaldoOP3w ago
Could someone please help me? I'm starting to think that filament isn't very responsive, as I've posted this question in several places and no one can help me.
Nox™
Nox™3w ago
There's a cool plugin doing what you are looking for. Look for it on the filament website.
Dennis Koch
Dennis Koch3w ago
There is no way to use two separate layouts for mobile/desktop Filament tries it's best to be responsive out of the box. But there's no separate definitions for mobile/desktop so it's not super flexible.
zoomZoom
zoomZoom3w ago
Filament
Table Layout Toggle by Thomas Georgel - Filament
Provides a toggle button for tables, allowing users to switch between Grid and Table layout.
joao nivaldo
joao nivaldoOP3w ago
What would be the plugin please? I understand. Do you have any suggestions on the best way to do this? This project requires a traditional desktop layout and a split layout on mobile. Thank you.
Dennis Koch
Dennis Koch3w ago
Maybe CSS could already solve this?
joao nivaldo
joao nivaldoOP3w ago
I'm thinking about creating a custom page and having two tables in it. Then, in the blade, I control which one will appear via the Tailwind breakpoint. Is it possible to have two tables on a custom page? If so, where can I see this in the documentation, please?
Dennis Koch
Dennis Koch3w ago
No, but you can create 2 Livewire components with a table each.
joao nivaldo
joao nivaldoOP3w ago
ok

Did you find this page helpful?