react-bootstrap-table
react-bootstrap-table copied to clipboard
Is it possible to inline style a column TD?
I am aware of columnClassName for styling TD but is it possible to pass inline style to the TD?
Something like this?
<TableHeaderColumn dataField="read_by"
columnStyle={{"backgroundColor": "pink"}}
width="80px"
dataFormat={ this.read_byLinkFormatter }
dataAlign="center">read_by</TableHeaderColumn>
Hi @lunikernel, use tdStyle.
@AllenFang how can I style cells in a different way basing on data? I have a table with order predictions and need to have different cell background for past days and for future days. I know exactly which day is which, just don't know how to style it
@mayacode currently, the tdStyle is only accept a object, but I think we can accept a funciton. PR is welcome. BTW, react-bootstrap-table2 already release, you can use it :)