F
Filament15mo ago
Skjena

The table design breaks after adding url() to the table columns.

The table design breaks after adding url() to the table columns.
5 Replies
Skjena
SkjenaOP15mo ago
If I hadn't put the url(), my table would appear as follows.
Skjena
SkjenaOP15mo ago
If I included the url(), my table would appear as follows.
Skjena
SkjenaOP15mo ago
Here is my code
return [
Split::make([
Stack::make([
SpatieMediaLibraryImageColumn::make('asset_images')
->collection('asset_images')
// ->conversion('thumb')
->extraAttributes([
'class' => 'mb-2',
])
->url(fn (Model $record): string => route('filament.app.resources.assets.view', ['record' => $record])),
TextColumn::make('asset_type.name')
->label(strval(__('cranberry-muffin::cranberry-muffin.table.asset.asset_type')))
->searchable()
->color('primary')
->url(fn (Model $record): string => route('filament.app.resources.assets.index', ['tableFilters' => ['asset_type' => ['asset_type_id' => [$record->asset_type->id]]]]))
->sortable(),
])
])
];
return [
Split::make([
Stack::make([
SpatieMediaLibraryImageColumn::make('asset_images')
->collection('asset_images')
// ->conversion('thumb')
->extraAttributes([
'class' => 'mb-2',
])
->url(fn (Model $record): string => route('filament.app.resources.assets.view', ['record' => $record])),
TextColumn::make('asset_type.name')
->label(strval(__('cranberry-muffin::cranberry-muffin.table.asset.asset_type')))
->searchable()
->color('primary')
->url(fn (Model $record): string => route('filament.app.resources.assets.index', ['tableFilters' => ['asset_type' => ['asset_type_id' => [$record->asset_type->id]]]]))
->sortable(),
])
])
];
Jota Ele
Jota Ele11mo ago
hi, can you solve it?
Skjena
SkjenaOP11mo ago
yeah
Want results from more Discord servers?
Add your server