0

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;
}
www
  • 38,575
  • 12
  • 48
  • 84
MLS
  • 108
  • 14

1 Answers1

0

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;
}
MLS
  • 108
  • 14