If I understand your question correctly, you would like to have a sticky heading in the form of a spreadsheet. You can do this with a component ScrollSync, see demo / docs .
Here is an example shown in the docs:
import { Grid, List, ScrollSync } from 'react-virtualized'
import 'react-virtualized/styles.css';
function render (props) {
return (
<ScrollSync>
{({ clientHeight, clientWidth, onScroll, scrollHeight, scrollLeft, scrollTop, scrollWidth }) => (
<div className='Table'>
<div className='LeftColumn'>
<List
scrollTop={scrollTop}
{...props}
/>
</div>
<div className='RightColumn'>
<Grid
onScroll={onScroll}
{...props}
/>
</div>
</div>
)}
</ScrollSync>
)
}
source
share