Problem/Motivation
Currently custom tables with sticky headers don't work out of the box.
Steps to reproduce
Create a custom form with sticky header
'#sticky' => TRUE,
Proposed resolution
As for for the template gin/templates/views/views-view-table.html.twig
which has a wrapper div with the class gin-table-scroll-wrapper
The table template templates/dataset/table.html.twig
should have a wrapper div with the class gin-table-scroll-wrapper instead of the current layer-wrapper gin-layer-wrapper
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | Screenshot 2023-07-06 at 11.38.37 AM.png | 285.99 KB | sahal_va |
| #18 | gin_sticky_header_bug_screenshot.jpg | 79.04 KB | uri_frazier |
| #2 | gin--3344925--1.patch | 433 bytes | abelass |
Issue fork gin-3344925
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abelassHere is a patch
Comment #4
paul121 commentedI am experiencing this as well. Here is my temporary fix - add
gin-table-scroll-wrapperclass in a wrapper container:I imagine that the patch in #2 works. But it seems likely that the
layer-wrapperandgin-layer-wrapperclasses are used for other things, so maybe don't remove them? I think you could addgin-table-scroll-wrapperand be just fine.Comment #6
paul121 commentedComment #7
abelass@paul121, you are right of course.
As the views template didn't have other classes, I just removed them.
Comment #9
saschaeggiClosing this as duplicate, as we'll include it in #3293369: Table header overflow issue for multiple user role on permissions page.
Comment #10
saschaeggiComment #11
saschaeggiComment #12
saschaeggi@paul121 I reopened this issue as #3293369: Table header overflow issue for multiple user role on permissions page. seems to take longer than expected. Please review, thanks!
Comment #13
saschaeggiComment #14
saschaeggiComment #15
paul121 commentedGreat, my table with
'#sticky' => TRUEnow works without my workaround described in #4.Comment #16
saschaeggiThanks!
Comment #18
uri_frazierI still get the bug described in issue https://www.drupal.org/project/gin/issues/3338209 (Sticky header triggered to early) even after updating to
3.0.0-rc4. This is while using Chrome114.0.5735.198and Firefox114.0.1(See screenshot
gin_sticky_header_bug_screenshot.jpg).Comment #19
sahal_va commentedI am also getting the same issue mentioned in https://www.drupal.org/project/gin/issues/3338209

Issue occurs only when the table view has more number of columns. (ie. when the horizontal scroller appears)
See screenshot.
Note: Horizontal scroller div has ' --is-sticky' class
Comment #20
abelassI confirm, bug is not resolved in 8.x-3.0-rc4
Comment #21
rveillard commentedHi, I confirm #19, the issue is still occurring when the horizontal scrollbar appears.
Can you please reopen this issue so it can be fixed ?
Thanks
Tested on rc6
Comment #24
asherry commentedI'm still seeing this issue as well with the paragraphs report. That module is just calling:
But the
<thead>element ends up with this even before you scroll down.Comment #25
asherry commentedaccidentally updated summary, fixed summary for issue
Comment #26
asherry commented