Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Conversation

@martin-brennan-csnet
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant