Prevent table checkbox from growing
How do i prevent this (checkbox td growing) from happening?
21 Replies
extraAttributes([‘style’ => ‘width: 1px’])
Or a class of w-px if you safelist it in your tailwind config.
Thanks Adam, but where should i put the extra attribute? since i don't have access to the checkbox column?
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
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 allyea, that's odd, that's for form components
it might only apply to the table grid layout too
it looks like a bug rather than something you should fix
cc @zepfietje
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 v2Should be fixed by my work earlier today. Pull in 3.x and verify if you like, @saadeguilherme. 🙂
Thanks Zep! Will take a look after lunch
@zepfietje looking good! The only thing now is the checkbox
<td>
taking 1/4 of the tableThat's always been like that, right? Simply how tables lay out their columns.
A simple
w-1
in tables/resources/view/index
does the trickquote
yeah i think we used to have a fixed width for this one Zep
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')
like that
Oh only now I see it doesn't make sense. 😂
Solution
This has been fixed on 3.x now, @saadeguilherme!
Thanks Zep! Sorry for bothering you
No worries. Thank you for reporting!