material-table
material-table copied to clipboard
Is it possible to get rid of column headers
Is it possible to get rid of the column headers?

I can add this feature for next release.
But i can give a workaround:
- set
pagingandtoolbarto false in options - override Header components with null
<MaterialTable
columns={[
{ title: 'Adı', field: 'name' },
{ title: 'Soyadı', field: 'surname' },
{ title: 'Doğum Yılı', field: 'birthYear', type: 'numeric' },
{ title: 'Doğum Yeri', field: 'birthCity', lookup: { 34: 'İstanbul', 63: 'Şanlıurfa' } }
]}
data={this.state.data}
title="Demo Title"
components={{
Header: props => null
}}
options={{
toolbar: false,
paging: false
}}
/>
Just curious, why is it that there are two sets of curly braces on options. I.e. why do you have to type options: {{ paging: false }} instead of just options: { paging: false }
Because first brace for react props. Second one means options is a json object. So you cant give many props with one brace. It is same with style props of component:
<div style={{color: 'red'}}>red text</div>