Change the size of the input in TextInputColumn

Hello, I am trying to change the size of the input field of the TextInputColumn. This is the code I use
Tables\Columns\TextInputColumn::make('stock')
->extraAttributes(['style' => 'max-width: 20px', 'class' => 'max-w-20'])
->label('Stock'),

Tables\Columns\TextInputColumn::make('stock')
->extraAttributes(['style' => 'max-width: 20px', 'class' => 'max-w-20'])
->label('Stock'),

Attached is a screenshot of the result. I am not managing to change it's size. Any suggestions?
No description
3 Replies
awcodes
awcodes2w ago
Try extraInputAttributes()
JJSanders
JJSandersOP2w ago
When I change: https://github.com/filamentphp/filament/blob/dd4dd8a9cf7046de001c2a345087c4ee178c3d68/packages/tables/resources/views/columns/text-input-column.blade.php#L68 the min-w-48 to min-w-20 it works. I guess I need extraAttributes to change that. But can''t make it work...
GitHub
filament/packages/tables/resources/views/columns/text-input-column....
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
awcodes
awcodes2w ago
In that case the only solution would be through css in a custom theme, unless you publish the views which isn’t recommended. Possibly with '!min-w20’ but that would probably need a custom theme too as I don’t it’s a class in the default theme.

Did you find this page helpful?