TanStackT
TanStack2y ago
5 replies
inadequate-blush

Scroll Table Body with sticky head

Is it possible to make a Table Body scrollable with a sticky Table Head at the top? I use shadcn ui as ui "Library" and want to creat a data table with it. The table holds e.g. 1000 items. I found a solution where I can make the whole table scrollable with a sticky table head but there are two problems I don't like. The scollbar is displayed on the full height, also over the table head. I want it only to reach over the table body height. Also the bottom border of the table head goes away on scrolling. Is it possible to make just the table body scrollable?
Was this page helpful?