lrStickyHeader icon indicating copy to clipboard operation
lrStickyHeader copied to clipboard

added options to be able to set the scrollContainer and an offsetTopOverride value

Open martin-brennan-csnet opened this issue 8 years ago • 0 comments

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 - default window. A HTML element that should be used when calculating scroll top offsets for the positioning of the fixed thead element.
  • offsetTopOverride - default unused. An integer value overriding the offsetTop which is used to calculate when the thead 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.

martin-brennan-csnet avatar Sep 21 '15 01:09 martin-brennan-csnet