How can I set the width of a TableCell in Material UI react? I tried this, but it doesn't work:
return(
<Paper className={classes.root}>
<Table className={classes.table}>
<TableHead>
<TableRow>
<TableCell style={{width: '30%'}}>Vorname</TableCell>
<TableCell style={{width: '20%'}}>Nachname</TableCell>
<TableCell style={{width: '20%'}}>Soc. Vers. Nr.</TableCell>
<TableCell style={{width: '20%'}}>Geburtsdatum</TableCell>
<TableCell style={{width: '10%'}} colSpan={2}>Aktionen</TableCell>
</TableRow>
</TableHead>
<TableBody>
{delegates.map((delegateItem) => {
return(
<TableRow key={delegateItem.userData.id}>
<TableCell style={{width: '30%'}}>{delegateItem.userData.firstName}</TableCell>
<TableCell style={{width: '20%'}}>{delegateItem.userData.lastName}</TableCell>
<TableCell style={{width: '20%'}}>{delegateItem.userData.socSecNr}</TableCell>
<TableCell style={{width: '20%'}}>{delegateItem.userData.birthDateStr}</TableCell>
<TableCell style={{width: '5%'}}>
<Link to={`/delegateperms/${delegateItem.userData.id}`}>
<SettingsIcon/>
</Link>
</TableCell>
<TableCell style={{width: '5%'}}>
<Link to={`/delegatedelete/:${delegateItem.userData.id}`}>
<DeleteForeverIcon/>
</Link>
</TableCell>
</TableRow>
)
})}
</TableBody>
</Table>
</Paper>
)
All columns have the same width. I would like to have the width dynamically. How can I make this?