glin/reactable

Header can not be fixed on chrome

taiwankyh opened this issue · 4 comments

I use the reactable package version 0.4.4,
htmltools package version 0.5.7
htmlwidgets package version 1.6.4

I create a table, as
data %>% reactable (...)

It looked well and the header fixed at the Rstudio viewer panel. However, once it was saved and I use chrome (ver 版本 124.0.6367.61 (正式版本) (64 位元)) to open it. The header was not fixed. Because the table is desinged as expandable, and it was too inconvenient for no fixed header.

Could you please help me, thanks a lot.

Kuo Yao-Hung

glin commented

Hi, this may have been an issue with very old Chrome versions, but I can't reproduce now on Chrome 124 with those same package versions. Do you see the sticky header working in this example? https://glin.github.io/reactable/articles/examples.html#no-pagination

Otherwise can you post your full table code? Maybe there's something special about the styling there.

glin commented

Yep, by default the table height is 100% of its parent element, so it'll fill the page if you don't set a fixed height on it. The sticky header will only work when there's a scrollbar in the table.