Problem/Motivation

After updating to Drupal 10.3 and above, the Enable Drupal style "sticky" table headers option no longer works in this theme or themes which depend on this theme.

Steps to reproduce

  1. Update to Drupal 10.3 or later
  2. Create a view with a table display
  3. Select the Enable Drupal style "sticky" table headers option

Proposed resolution

Drupal core issue 3439580 changed usage of the .sticky-enabled CSS class to .sticky-header.

We should update the CSS classes used in the views-view-table.html.twig file to include both the CSS classes.

Issue fork seven-3463443

Command icon 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

mdolnik created an issue. See original summary.

mdolnik’s picture

Status: Active » Needs review
StatusFileSize
new500 bytes

avpaderno made their first commit to this issue’s fork.

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: -views, -table, -sticky headers +Needs merge request

Since patches are no longer tested, a merge requests needs to be provided.

avpaderno’s picture

Title: Issue with Views Sticky Headers with Core 10.3 » "Enable Drupal style 'sticky' table headers" no longer works
Version: 1.0.0 » 1.0.x-dev
Issue summary: View changes
sandip’s picture

Assigned: Unassigned » sandip

I am working on it.

sandip’s picture

Assigned: sandip » Unassigned
Status: Needs work » Needs review
StatusFileSize
new166.63 KB
new164.3 KB

I think we dont need to keep both the css classes as there is no usage of .sticky-enabled is left. So i keep only .sticky-header.
I've attached before-and-after screenshot. If you inspect the "after" image, in DevTools you can see that the sticky-related CSS is correctly applied via the .sticky-header class.

avpaderno’s picture

Issue tags: -Needs merge request

  • avpaderno committed 516e868a on 1.0.x authored by sandip
    Issue #3463443: Enable Drupal style "sticky" table headers no longer...

  • avpaderno committed ed7d370b on 2.0.x
    Issue #3463443: Enable Drupal style "sticky" table headers no longer...
avpaderno’s picture

Status: Needs review » Fixed

Thank you!

Status: Fixed » Closed (fixed)

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