cscan / vue-excel-editor

Vue2 plugin for displaying and editing the array-of-object in Excel style
MIT License
557 stars 108 forks source link

Sticky Headers #122

Open oflefe opened 2 years ago

oflefe commented 2 years ago

Hi, I was wondering how I could make the headers sticky instead of the column. I tried to make position: sticky and top: 0 for thead tags with css with no luck. Any suggestions on how to get it to work?

cscan commented 2 years ago

set position sticky is the only way, did you try that?

ZPiDER666 commented 1 year ago

thead and tr unfortunately do not support position: sticky. th WOULD support it, but i also didnt have any luck trying that.

however you should not need to do that: the table supports a height property (or if you want finer control, size the .table-content to a specific position. then you will have a vertical scroll bar and headers are sticky.

just a small issue there: with no-mouse-scroll=false (default), i cant scroll the table anymore (interecting with the scrollbar works though) - which makes this approach useless for me..