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

Sticky header jumps around when changing columns #105

Closed
sonallux opened this issue Jul 15, 2022 · 3 comments
Closed

Sticky header jumps around when changing columns #105

sonallux opened this issue Jul 15, 2022 · 3 comments

Comments

@sonallux
Copy link

The sticky header does not stay at the top when changing the column order after scrolling down.

Reproduce

  • Open Stackblitz: https://stackblitz.com/edit/angular-nfgsup
  • Scroll down more than 10 elements
  • Press the "Toggle columns" button
  • Sticky header is not at the top any more (see screenshot below)
  • When scrolling again the sticky header jumps to the top again

image

@williammnarrowpath
Copy link

Any update on this issue?

@sonallux
Copy link
Author

update on this issue?

Not really, unfortunately. I have looked into the code a bit and found more background about what's causing this behaviour. The sticky header is kept at the top by adding top: <some offst> CSS style to the <th> element. But when the columns change, the header elements are removed and readded to the DOM, which discards the top CSS property. It is actually set to top: 0px.

Unfortunately, I have currently no idea how to reset the top property to the correct offset after the columns have been changed. Maybe @diprokon has some idea?

@kiranatious
Copy link

can this be fixed for 1.3.*

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

3 participants