Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why data-sticky-last-left-td has element.style left: 150px; #26

Open
tqdo opened this issue Dec 27, 2020 · 4 comments
Open

Why data-sticky-last-left-td has element.style left: 150px; #26

tqdo opened this issue Dec 27, 2020 · 4 comments

Comments

@tqdo
Copy link

tqdo commented Dec 27, 2020

I am trying to make 2 columns left-sticky. The first column is fine, but for some reasons the 2nd one is not right next to the first one. Instead for some reasons it has style left:150px; and ends up on top of the 3rd column, which is not sticky.

Screen Shot 2020-12-27 at 12 04 10 PM

I tried to set left:auto !important for the 2nd column but it is no longer sticky. Really appreciate any help.

@sidney-reis
Copy link

@tqdo I'm having the exact same issue. Were you able to solve it?

@alextrastero
Copy link

alextrastero commented May 11, 2022

I'm afraid the magic behind a sticky table is that the sticky column cells needs to have a defined width, so each cell has 150px of width and each sticky element has left: 0 150 300 etc

@hyperactivepuss
Copy link

my workaround was

div[role="row"] {
          width: calc(2400px - 98px) !important;

          div[role="columnheader"]:nth-child(1),
          div[role="cell"]:nth-child(1) {
            position: sticky;
            left: 0;
            width: 52px !important;
          }

          div[role="columnheader"]:nth-child(2),
          div[role="cell"]:nth-child(2) {
            left: 52px !important;
          }

          div[role="columnheader"]:nth-child(3),
          div[role="cell"]:nth-child(3) {
            left: 202px !important;
          }

          div[role="columnheader"]:nth-child(4),
          div[role="cell"]:nth-child(4) {
            left: 352px !important;
          }
        }

@RwwL
Copy link

RwwL commented Jul 17, 2023

Hmm... #26 .. maybe w/ multiple sticky columns provided, they all need a fixed width? That would sort of make sense to me based on comments seen there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants