filament/tables
v3.2.92
v11.20.0
No response
PHP 8.2.21
Split table component has weird output when it contains ViewComponent with disabledClick on small screen.
We have 2 columns only: a main column and the actions column (built-in). Our goal was to have the actions wrap below the main column on small screens, but we found that the ViewColumn content is falling apart. Observing the generated HTML we can find uncountable tags being empty links to the edit page even though we called ->disabledClick()
on the ViewColumn.
We expect the column to be displayed as it is without wrapping it in the Split component and the actions appear under it.
Actions are not under it in this screenshot but this is how the ViewColumn look like if not wrapped in a Split component:
Add a Split to the columns of the table with a single ViewColumn (probably applies if there are other columns in the split) which has complex html in its template (some levels of divs inside, using flexboxes, etc.) and make sure to set it with ->disabledClick()
.
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\Layout\Split::make([
Tables\Columns\ViewColumn::make('post')
->disabledClick()
->view('filament.tables.post-column'),
]),
])
->actions([
Tables\Actions\EditAction::make()->color('warning'),
]);
}
In the repro repo:
php artisan key:generate
php artisan migrate -seed
php artisan serve
open http://localhost:8000/admin/posts
# then login with [email protected] / password
https://github.com/watchenterprise/filament-split-issue-reproduce
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too