react-bootstrap-table icon indicating copy to clipboard operation
react-bootstrap-table copied to clipboard

Is it possible to inline style a column TD?

Open starqueue opened this issue 9 years ago • 3 comments

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>

starqueue avatar Apr 20 '17 04:04 starqueue

Hi @lunikernel, use tdStyle.

AllenFang avatar Apr 21 '17 14:04 AllenFang

@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 avatar Jan 30 '18 13:01 mayacode

@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 :)

AllenFang avatar Feb 02 '18 09:02 AllenFang