How can I implement pinned table headers?
See original GitHub issueSimilar 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:
- Created 2 years ago
- Comments:8
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@strich It works, you just need to set it’s width. https://codesandbox.io/s/react-virtual-grid-sticky-first-row-forked-b64ss?file=/src/index.js
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