lrStickyHeader
lrStickyHeader copied to clipboard
added options to be able to set the scrollContainer and an offsetTopOverride value
I needed to be able to have the sticky thead
functionality inside an absolutely scrolling div container. Originally the scroll listeners were set to the window
and the top
position was always set to 0.
I've added an options
object with the following properties available:
-
scrollContainer
- defaultwindow
. A HTML element that should be used when calculating scroll top offsets for the positioning of the fixedthead
element. -
offsetTopOverride
- default unused. An integer value overriding theoffsetTop
which is used to calculate when thethead
should start being fixed when scrolling. Sometimes you may want to start the fixed scrolling immediately or after a set number of pixes. For example the table I was using it with had an extra row under the header with search filter information.