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.

Comments

tregismoreira created an issue. See original summary.

tregismoreira’s picture

I've figured out that the class "sticky-enabled" isn't printed in the table. Here's my patch to fix this.

markhalliwell’s picture

Component: User interface » Templates
Status: Active » Needs work

This should be applied to the normal table.html.twig file as well.

tregismoreira’s picture

Status: Needs work » Needs review

For 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.

markhalliwell’s picture

Status: Needs review » Needs work

I'm talking about adding the same class to the table.html.twig template as was done in the patch.

tregismoreira’s picture

Yeah, 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.

tregismoreira’s picture

Status: Needs work » Needs review

neardark’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.