glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
625 stars 80 forks source link

How to put horizontal scroll bar on top #389

Open Yousuf28 opened 1 month ago

Yousuf28 commented 1 month ago

I was wondering if there is any way to put horizontal scroll bar on top of the table. also it would be nice if all columns name stay visible while scrolling down. thanks in advance.

glin commented 2 weeks ago

The horizontal scroll bar being at the bottom is a browser thing, so there's nothing we can really do to change that.

Column headers are sticky and should stay visible when scrolling already. You might just have to limit the height so the full table appears on one page, and the vertical scrollbar appears. Check out this example, Fixed height + sticky header/footer.

Limiting the height should help with the horizontal scrollbar visibility as well. I'm kind of guessing that you have a tall table that doesn't fit on one page, so the horizontal scrollbar isn't immediately visible.