Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Cannot make Header row fixed #387

Open
Praki06 opened this issue Aug 25, 2017 · 3 comments
Open

Cannot make Header row fixed #387

Praki06 opened this issue Aug 25, 2017 · 3 comments

Comments

@Praki06
Copy link

Praki06 commented Aug 25, 2017

Adding postion:fixed to the header breaks the column layout. Is there any other way to make the headers fixed.

@stclairdaniel
Copy link

stclairdaniel commented Oct 5, 2017

I think there is another open issue about this, but the short answer is no. Here's a sort of hacky way that will accomplish it though - wrap your table in a div and give it this:
onScroll={function(e) {let translate = translate(0,${e.nativeEvent.target.scrollTop}px); document.querySelector(".reactable-column-header" ).style.transform = translate;

@kalimuthu123
Copy link

give me a clear clarification with the code

@kalimuthu123
Copy link

this works for me but it creates the flickering effect in the header when hoever
table thead tr:nth-child(1) th{
background: white;
position: sticky;
top: 0;
z-index: 10;
}

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

No branches or pull requests

3 participants