Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to get rid of column headers #136

Closed
urirahimi opened this issue Dec 31, 2018 · 3 comments
Closed

Is it possible to get rid of column headers #136

urirahimi opened this issue Dec 31, 2018 · 3 comments
Assignees
Labels

Comments

@urirahimi
Copy link

urirahimi commented Dec 31, 2018

Is it possible to get rid of the column headers?
screen shot 2018-12-31 at 7 53 34 am

@urirahimi urirahimi changed the title Not able to find width property to make table fill width of container Is it possible to get rid of column headers Dec 31, 2018
@mbrn
Copy link
Owner

mbrn commented Dec 31, 2018

I can add this feature for next release.

But i can give a workaround:

  1. set paging and toolbar to false in options
  2. 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
          }}
        />

@mbrn mbrn self-assigned this Dec 31, 2018
@mbrn mbrn added the feature label Dec 31, 2018
@mbrn mbrn closed this as completed in ac75275 Jan 2, 2019
@jakeleventhal
Copy link

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 }

@mbrn
Copy link
Owner

mbrn commented Jan 17, 2019

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>

FalkF pushed a commit to FalkF/material-table that referenced this issue May 28, 2021
Add prop options.showDetailPanelIcon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants