freeze the header of rpivotTable shiny

2019-08-25 02:58发布

问题:

In shiny rpivotTable how can I freeze the header?

I know how to add a scroll bar in css to the pivot table, however I don't know how to freeze the header.

#PivotFinal {
  overflow-y: scroll;
}

回答1:

I figured out how to do it, in the .css file I added the below code.

table.pvtTable thead th{
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 999;
}