material-table
material-table copied to clipboard
Increase the font in the Pagination component ...
I tried to use component overriding for Pagination as follows : <MaterialTable components={{ Pagination: props => (
The intent was that the text "Rows per page" and the text "1-20 of 500" (for example) would be in font size of 14. I could not get this to work. Is this doable ?
Hi @anand-swaminathan, Try this:
// import { TablePagination } from '@material-ui/core';
<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={{
Pagination: props => (
<TablePagination
{...props}
labelRowsPerPage={<div style={{fontSize: 14}}>{props.labelRowsPerPage}</div>}
labelDisplayedRows={row => <div style={{fontSize: 14}}>{props.labelDisplayedRows(row)}</div>}
SelectProps={{
style:{
fontSize: 14
}
}}
/>
)
}}
/>
This worked well. Thanks so much