Sticky header isn't working when using Bootstrap as base or main theme.
Steps to reproduce the issue:
- Create a view with any sorts criteria and fields;
- Chose the format Table;
- In the format settings, chose the option Enable Drupal style "sticky" table headers (Javascript);
- Save and test the view.
Then when scroll down the page, the header won't be sticked at all. Using Bartik, for example, it works well.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | bootstrap-fix_views_table_sticky_header-2821299-6.patch | 1.13 KB | tregismoreira |
| #2 | bootstrap-fix_views_table_sticky_header-2821299-2.patch | 685 bytes | tregismoreira |
Comments
Comment #2
tregismoreira commentedI've figured out that the class "sticky-enabled" isn't printed in the table. Here's my patch to fix this.
Comment #3
markhalliwellThis should be applied to the normal
table.html.twigfile as well.Comment #4
tregismoreira commentedFor normal tables it is already working, since the property #sticky is checked when rendering the table. You can see this simply by enabling Bootstrap as admin theme and going to Permissions page.
Comment #5
markhalliwellI'm talking about adding the same class to the table.html.twig template as was done in the patch.
Comment #6
tregismoreira commentedYeah, I know. But as I said, it isn't necessary because it is working without this. This class is added by the system.
But anyway, here is the new patch.
Comment #7
tregismoreira commentedComment #9
neardark commented