react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

[FEATURE]: Sticky Table Header

Open ashgh opened this issue 6 years ago • 2 comments

Feature Check list

  • [x ] Agree to the Code of Conduct
  • [ x] Read the README to ensure the feature is not already present
  • [x ] You read Creating Issues, Features and Pull Requests
  • [ x] Considered the value versus complexity for all users of the library as well as library maintenance
  • [ x] Considered if this can be a storybook or documentation example

Is your feature request related to a problem? Please describe

Would like the ability to have a sticky header as the page scrolls instead of just the table body. The current fixed header and fixed height will make the table body scrollable separate from the page scroll.

Describe the solution you'd like

Ability to have a sticky header that works with page scroll instead of just table body scroll.

Describe alternatives you've considered

overriding head row style to use position: sticky and top: 0, but no luck. Suspect because it is inside a flex box that it is not working.

ashgh avatar Apr 07 '20 22:04 ashgh

Yea this has been a thorn in my side. The whole fixed header thing needs to be refactored, but it's a lot of work and I have not had the time lately. I'll flag this as a feature so it doesn't go stale or perhaps someone can propose a design/contribution. There is an existing issue as well that I will link as a dupe.

jbetancur avatar Apr 13 '20 18:04 jbetancur

I should have fixed this a while back fixedHeader should now work correctly. https://github.com/jbetancur/react-data-table-component#header

jbetancur avatar Nov 25 '20 01:11 jbetancur