question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I implement pinned table headers?

See original GitHub issue

Similar issue: https://github.com/tannerlinsley/react-virtual/issues/115

Thanks to the above issue, it is now possible to pin certain list items in the virtual list which I have successfully tested. However I cannot use position: sticky as far as I can tell, because of the way react-virtual renders each cell as its own div?

As an example, here is a table using position: sticky to pin both vertical and horizontal cells: https://codepen.io/chriscoyier/pen/yLVNErX

How would we achieve the same effect with react-virtual?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
bestwebdevelopercommented, Aug 14, 2021
1reaction
piecykcommented, Aug 10, 2021

One option is to use pseudo elements on tbody and control them via css custom properties, checkout the comment https://github.com/tannerlinsley/react-virtual/issues/10#issuecomment-779694099

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I implement pinned table headers? #180 - GitHub
Thanks to the above issue, it is now possible to pin certain list items in the virtual list which I have successfully tested....
Read more >
Fixed Table Headers - Adrian Roselli
A few months ago I built an example of fixed table headers that used CSS position: sticky , partly to demonstrate it is...
Read more >
Position Sticky and Table Headers | CSS-Tricks
Position Sticky and Table Headers ... Use table elements, but totally remove all their styling defaults with new display values.
Read more >
How to create a table with fixed header and scrollable body
1. Blaze UI Cards Header Body and Footer · 2. How to Click on header to add another header in jQuery ? ·...
Read more >
Tables with Irregular Headers | Web Accessibility Initiative (WAI)
This can be done by setting the scope attribute of the header cell to the value colgroup . The same principle applies to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found