filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
15.94k stars 2.54k forks source link

TextColumn does not resize when other column has `grow()` enabled #13347

Closed ju5t closed 2 weeks ago

ju5t commented 2 weeks ago

Package

filament/filament

Package Version

3.2.64 (tables)

Laravel Version

11.3.1

Livewire Version

3.4.10

PHP Version

8.2

Problem description

Edit: this needs some more detail.

If you set grow(true) on a column you cannot change the width of other columns in that table. Although width is added to the inline style element, it doesn't do anything because the parent has w-full.

Example:

TextColumn::make('id'),
TextColumn::make('name')
    ->width('400px'),
TextColumn::make('details')
    ->grow(true)
TextColumn::make('date'),

Passing a percentage to width works, but perhaps percentages take precedence over pixels.

w-full has been added to the text-column div in PR #9149. Aligning content doesn't require the width to be full. I have only done a few tests and removing it did not have any effect.

Expected behavior

I expected the column to resize.

Steps to reproduce

See repo: https://github.com/ju5t/filament-w-full

npm install && npm run build
php artisan migrate --seed

Reproduction repository (issue will be closed if this is not valid)

https://github.com/ju5t/filament-w-full

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

ju5t commented 2 weeks ago

I'm closing this issue for now because passing pixels is not recommended in tables. As you can specify percentages or use formatStateUsing to return a view with a min-w-*-attribute, I believe there are solutions for this issue already and w-full does not need to be removed.