Cannot customize column header styles
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.
This is done. It will be in version 1.12.0.
How to use?:
- Add headerStyle to options to apply a style to all headers.
- 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'}
}}
/>
This is done. It will be in version 1.12.0.
How to use?:
- Add headerStyle to options to apply a style to all headers.
- 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 ?
Hi @kaleshasheik ,
I think tomorrow it will be released.
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
v1.12.0 published. You can upgrade.
v1.12.0 published. You can upgrade.
Hi @kaleshasheik ,
I think tomorrow it will be released.
Thank you.