Is there a way to remove the header from a react-data-grid?
good question, deserves an answer! I wish I knew, as I want to do so too. Tried <ReactDataGrid headerRowHeight={0} /> but that didn't work ...
I used the following custom style hack to hide the header.
.react-grid-Header {
display:none !important;
}
.react-grid-Viewport {
top: 0px !important;
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.
in the JSX I added a wrapper:
return (
<div className = {this.showHeader ? "" : "noHeaderWrapper "} >
<ReactDataGrid />
</div>
);
and in external css I used the code from answer from @arkoblog!
.noHeaderWrapper .react-grid-Header {
display: none !important;
}
.noHeaderWrapper .react-grid-Viewport {
top: 0px !important;
}