Skip to content

Ability to set column width and className for <th> and <td> in shadcn-ui Data Table #1122

Closed Answered by TheBassGuy
TheBassGuy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, just found a workaround, added an array of classNames as a prop in data-table.tsx, and took the column index from the map in data-table.tsx, now I just pass the classNames like ["w-32", "w-48", "", "w-12", "w-32", "w-16"], works fine for me, thanks for the help

This discussion can be hence closed now

Thanks everyone for making such a beautiful library :D

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@TheBassGuy
Comment options

@corysimmons
Comment options

@TheBassGuy
Comment options

Answer selected by TheBassGuy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants