Allow many tables on one page, add dynamic offset and fix bugs#149
Open
amadeuszi wants to merge 6 commits intojmosbech:masterfrom
Open
Allow many tables on one page, add dynamic offset and fix bugs#149amadeuszi wants to merge 6 commits intojmosbech:masterfrom
amadeuszi wants to merge 6 commits intojmosbech:masterfrom
Conversation
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.
This was referenced Jun 21, 2018
| 'position': 'fixed', | ||
| 'margin-top': base.options.marginTop, | ||
| 'top': 0, | ||
| 'top': base.topOffset - (base.isWindowScrolling ? 0 : base.$window.scrollTop()), |
There was a problem hiding this comment.
Looks good, when can I expect this code to be available in main code?
Author
There was a problem hiding this comment.
Probably never, because the author does not respond. But these changes are available in this fork: https://github.com/Roblens/StickyTableHeaders
vaibhavarora14
approved these changes
Nov 9, 2018
|
Merge this! |
|
In case anyone still using this I forked that and merged this bug fix and having a CDN link on jsdeliver: |
vaibhavarora14
approved these changes
Aug 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
$clonedHeader.div in demo/scrollable-div-with-clipping-container.html
dynamicTopOffsetUser 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.