How to configure a column to only be as wide as it's content?
Does anyone know if there's a way to force the first column (the one with the checkbox) to only be as wide as said checkbox?

4 Replies
constant-blue•16mo ago
set the header width to be a static value
eager-peach•16mo ago
just don't use the size properties from TanStack Table at all and rely on the normal semantic table elements CSS width behavior
sunny-greenOP•16mo ago
Yeah, I'm setting the
th
and td
's width
property in CSS, just for that column
@mtti.gg ⬆️constant-blue•16mo ago
I'm assuming that isn't working, you may have to set the
table-layout
to fixed
. I know also with the library I use client side needs to have the padding stripped from the cell and header cell, not sure if that is the case for you aswell.