-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Table] can't change row padding (top and bottom) #5089
Comments
@oliviertassinari let myPaddingStyle = {
paddingTop: 10,
paddingBottom: 10,
}
<Table>
<TableHeader adjustForCheckbox={false} displaySelectAll={false} fixedHeader={true}>
<TableRow style={myPaddingStyle}>
<TableHeaderColumn>id</TableHeaderColumn>
<TableHeaderColumn>name</TableHeaderColumn>
<TableHeaderColumn>number</TableHeaderColumn>
</TableRow>
</TableHeader>
<TableBody showRowHover={true} displayRowCheckbox={false}>
{data.map(item => {
return (
<TableRow key={item.id} style={myPaddingStyle}>
<TableRowColumn>{item.id}</TableRowColumn>
<TableRowColumn>{item.name}</TableRowColumn>
<TableRowColumn>{item.number}</TableRowColumn>
</TableRow>
);
})}
</TableBody>
</Table> |
That padding doesn't seem to have any impact. Can't we just delete that line https://github.com/callemall/material-ui/blob/master/src/Table/Table.js#L13? |
Following that answer on StackOverflow you can't apply a padding on a I'm removing that style from our component with #5932. |
Problem description
The Table component has a padding style assigned to it which can't be overridden. I tried setting the style attribute of the
Table
,TableHeader
,TableRow
andTableHeaderColumn
with no success.Steps to reproduce
Create any table and try setting the padding (top and bottom) for the header and row.
This is the table I created:
Versions
I have asked a question regarding this issue in Stack Overflow (http://stackoverflow.com/questions/39210565/material-ui-change-rows-height-and-padding-in-table/39210737#39210737).
The text was updated successfully, but these errors were encountered: