F
Filament17mo ago
Saade

Prevent table checkbox from growing

How do i prevent this (checkbox td growing) from happening?
Solution:
This has been fixed on 3.x now, @saadeguilherme!
Jump to solution
21 Replies
awcodes
awcodes17mo ago
extraAttributes([‘style’ => ‘width: 1px’]) Or a class of w-px if you safelist it in your tailwind config.
Saade
SaadeOP17mo ago
Thanks Adam, but where should i put the extra attribute? since i don't have access to the checkbox column?
awcodes
awcodes17mo ago
if you don't have access to it then you'd have to fnd some way to target it with CSS or you could specify a min-width/full-width on the name column probably
Saade
SaadeOP17mo ago
shouldn't ->columnSpanFull() on the name column work in that case? cause it's not i don't get it why there's columnSpan stuff on the columns since they don't affect columns at all
awcodes
awcodes17mo ago
yea, that's odd, that's for form components it might only apply to the table grid layout too
Dan Harrin
Dan Harrin17mo ago
it looks like a bug rather than something you should fix cc @zepfietje
Saade
SaadeOP17mo ago
Well, since you tagged him, @zepfietje as seen on the image, the bulk checkbox has a ps-6 (1.5rem) padding while the record checkbox has a px-4 (1rem) padding, so they're not aligned as it was in v2
Zep Fietje
Zep Fietje17mo ago
Should be fixed by my work earlier today. Pull in 3.x and verify if you like, @saadeguilherme. 🙂
Saade
SaadeOP17mo ago
Thanks Zep! Will take a look after lunch
Saade
SaadeOP17mo ago
@zepfietje looking good! The only thing now is the checkbox <td> taking 1/4 of the table
Zep Fietje
Zep Fietje17mo ago
That's always been like that, right? Simply how tables lay out their columns.
Saade
SaadeOP17mo ago
A simple w-1 in tables/resources/view/index does the trick
Saade
SaadeOP17mo ago
quote
Dan Harrin
Dan Harrin17mo ago
yeah i think we used to have a fixed width for this one Zep
Saade
SaadeOP17mo ago
Saade
SaadeOP17mo ago
I know its how tables behaves, but it does not make sense to have a table looking like that or... we can extract the checkbox from blade to the $table->columns(), and let people customize using $table->getRecordCheckboxColumn()->label('Plz select')
Saade
SaadeOP17mo ago
like that
Zep Fietje
Zep Fietje17mo ago
Oh only now I see it doesn't make sense. 😂
Solution
Zep Fietje
Zep Fietje17mo ago
This has been fixed on 3.x now, @saadeguilherme!
Saade
SaadeOP17mo ago
Thanks Zep! Sorry for bothering you
Zep Fietje
Zep Fietje17mo ago
No worries. Thank you for reporting!
Want results from more Discord servers?
Add your server