material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Cannot customize column header styles

Open aswamina opened this issue 7 years ago • 7 comments

I noticed that I cannot customize the column header font or any other styles for the column header. Would it be possible to address that as a component, so that I can style it for fonts, background color etc. etc.

aswamina avatar Jan 06 '19 19:01 aswamina

This is done. It will be in version 1.12.0.

How to use?:

  1. Add headerStyle to options to apply a style to all headers.
  2. Add headerStyle to column to apply a style to specified header.
<MaterialTable
          columns={[
            { title: 'Adı', field: 'name', headerStyle: {color: 'red', fontSize: 24} },
            { 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"
          options={{              
            headerStyle: {color: 'green'}
          }}
        />

mbrn avatar Jan 07 '19 05:01 mbrn

This is done. It will be in version 1.12.0.

How to use?:

  1. Add headerStyle to options to apply a style to all headers.
  2. Add headerStyle to column to apply a style to specified header.
<MaterialTable
          columns={[
            { title: 'Adı', field: 'name', headerStyle: {color: 'red', fontSize: 24} },
            { 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"
          options={{              
            headerStyle: {color: 'green'}
          }}
        />

Please confirm when this new version (1.12.0.) will be released ?

kaleshasheik avatar Jan 08 '19 15:01 kaleshasheik

Hi @kaleshasheik ,

I think tomorrow it will be released.

mbrn avatar Jan 08 '19 16:01 mbrn

Fantastic. Thanks Mehmet

On Tue, Jan 8, 2019 at 8:32 AM Mehmet Baran [email protected] wrote:

Hi @kaleshasheik https://github.com/kaleshasheik ,

I think tomorrow it will be released.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mbrn/material-table/issues/142#issuecomment-452363240, or mute the thread https://github.com/notifications/unsubscribe-auth/AIva_fy2VS8qlccrjreWDc7qd59xwOWIks5vBMgKgaJpZM4Zyk5x .

-- Anand Swaminathan

aswamina avatar Jan 08 '19 17:01 aswamina

v1.12.0 published. You can upgrade.

mbrn avatar Jan 09 '19 10:01 mbrn

v1.12.0 published. You can upgrade.

mbrn avatar Jan 09 '19 10:01 mbrn

Hi @kaleshasheik ,

I think tomorrow it will be released.

Thank you.

kaleshasheik avatar Jan 09 '19 16:01 kaleshasheik