I've been scouring the documentation but I'm still not certain this is feasible, but can an icon be specified in the table data / columns such that I can render generic icons controls along with my normal row text, e.g. trash-o, exclamation-triangle etc?
Hi @cnav007 Are you seeking this?
column formatter
const formatWithIcon = (cell,row) => {
return(
<span><Glyphicon glyph="zoom-in"/>cell</span>
)
}
const columns = [
{
dataField:'products',
text:'products',
}, {
dataField:'type',
text:'type',
}, {
dataField:'date',
text:'dateWithIcon',
formatter: formatWithIcon,
}
];
@Josh123321 's answer is correct. https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/column-props.html#columnformatter-function
thanks guys!
Is it possible to render icons inside column cells without having any other corresponding text that's coming from the data source? I'm just trying to make a column of right-facing arrows at the end of each row.
Most helpful comment
Hi @cnav007 Are you seeking this?
column formatter