I was looking at this example, and the question I have is for a sticky header. Example: https://material-table.com/#/docs/features/fixed-columns
I was trying to figure out to see if I can get the header that has Name up to BirthPlace to be stick, so that when I create the scroll bar, it will stay there. I tried everything, but it keeps giving me different results. Any help would be great
class BasicFixedColumns extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render() {
return (
<MaterialTable
title="Basic Fixed Columns Preview"
columns={[
{ title: 'Name', field: 'name', width: 150 },
{ title: 'Surname', field: 'surname', width: 150 },
{ title: 'Birth Year', field: 'birthYear', type: 'numeric', width: 150 },
{
title: 'Birth Place',
field: 'birthCity',
lookup: { 34: 'İstanbul', 63: 'Şanlıurfa' },
width: 150
},
{ title: 'Name', field: 'name', width: 150 },
{ title: 'Surname', field: 'surname', width: 150 },
{ title: 'Birth Year', field: 'birthYear', type: 'numeric', width: 150 },
{
title: 'Birth Place',
field: 'birthCity',
lookup: { 34: 'İstanbul', 63: 'Şanlıurfa' },
width: 150
},
]}
data={[
{ name: 'Mehmet', surname: 'Baran', birthYear: 1987, birthCity: 63 },
{ name: 'Zerya Betül', surname: 'Baran', birthYear: 2017, birthCity: 34 },
]}
options={{
fixedColumns: {
left: 2,
right: 1
}
}}
/>
)
}
}