Skip to content

Conversation

@amadeuszi
Copy link

@amadeuszi amadeuszi commented Jun 20, 2018

Bunch of bug fixes, flickering fixes, and performance improvements. Now you can have more than one table on one page. Better performance for large tables on Internet Explorer. Add possibility to dynamically offset the header when using with other sticky, interactive elements on the page

  • Cloning the header can result in generating tags with duplicate ids. This change adds suffixes to all ids in tags within the $clonedHeader.
  • When we set "position: fixed" on header, it is shown before other DOM elements. This behaviour causes problems, header can be shown outside of its container. I prepared interactive demo in demo/scrollable-div-with-clipping-container.html
  • Before this change there was an issue with horizontal scroll in scrollableArea. You can observe it by scrolling horizontally
    div in demo/scrollable-div-with-clipping-container.html
  • Top position should not be zero when table is in modal. This caused a problem. When scrolling the header would blink. Copied top value from function setPositionValues.
  • dynamicTopOffset User can provide a function which computes the offset. It can be useful, when one uses sticky menu above sticky headers and position of sticky menu can change on scroll.
  • We don't want to use debounced functions during initialization to prevent blinking.

Amadeusz Iwanowski added 6 commits June 18, 2018 14:13
Cloning the header can result in generating tags with duplicate ids.
This change adds suffixes to all ids in tags within the $clonedHeader.
When we set "position: fixed" on header, it is shown before other DOM elements.
This behaviour is causes problems because, for instance, header is shown
outside of its container. I prepared interactive
demo in demo/scrollable-div-with-clipping-container.html
Before this change there was an issue with horizontal scroll in scrollableArea.
You can observe it by scrolling horizontally
div in demo/scrollable-div-with-clipping-container.html
Top position should not be zero when table is in modal.
This caused a problem. When scrolling the header would blink.
Copied top value from function setPositionValues.
User can provide a function which computes the offset.
It can be useful, when one uses sticky menu above sticky headers and
position of sticky menu can change on scroll.
We don't want to use debounced functions during initialization
to prevent blinking.
'position': 'fixed',
'margin-top': base.options.marginTop,
'top': 0,
'top': base.topOffset - (base.isWindowScrolling ? 0 : base.$window.scrollTop()),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, when can I expect this code to be available in main code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably never, because the author does not respond. But these changes are available in this fork: https://github.com/Roblens/StickyTableHeaders

@batmanbury
Copy link

Merge this!

@DonSYS91
Copy link

DonSYS91 commented May 17, 2023

In case anyone still using this I forked that and merged this bug fix and having a CDN link on jsdeliver:
https://github.com/Roblens/StickyTableHeaders

@amadeuszi amadeuszi changed the title Improvements Allow many tables on one page, add dynamic offset and fix bugs Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants