Material-table: Center align in column

Created on 29 Jul 2019  路  4Comments  路  Source: mbrn/material-table

How would I center align a button/custom rendered object in a column. Opting to custom render the column value forces left alignment, but is there an easy way to center the contents of the column?

help wanted

All 4 comments

@nikhilwbhatia can you provide some minimal code to reproduce your issue?

You can inline style any component like this:

````
columns={[
{
title: "Avatar",
field: "avatar",
render: rowData => (
style={{ height: 36, borderRadius: "50%", margin: "0 auto" }}
src={rowData.avatar}

test
)
}
]}
````

i close this issue. reopen if you needed please

Worked for me, thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ps1011 picture ps1011  路  3Comments

jlgreene2 picture jlgreene2  路  3Comments

Mihier-Roy picture Mihier-Roy  路  3Comments

bohrsty picture bohrsty  路  3Comments

KKrisu picture KKrisu  路  3Comments