Fixing column width on Shadcn
I am using Shadcn and I am not able to set the columns width, no matter if I try to do it through tableOptions.defaultColumn or individual column defs!
Can anyone help me here?
2 Replies
vicious-gold•2y ago
In general, you can get the column size like so:
width: cell.column.getSize() for <td> cells
or
width: header.getSize(), for <th> cells.
If you need further help, please provide a sandbox of the issue.vicious-gold•2y ago
Column Sizing APIs | TanStack Table Docs
State
Column sizing state is stored on the table using the following shape: