Hello I have a table with some columns, data is taken from an API. Now I need to add another column where I will add a button with my own functionality (different functionality for each row). Can I somehow do it?
<BootstrapTable
data={content}
version="4"
striped
hover
remote
fetchInfo={{ dataTotalSize: totalSize }}
pagination
options={{
onPageChange: this.onPageChange,
hideSizePerPage: true,
page: filters.page + 1,
sizePerPage: filters.size,
onFilterChange: this.onFilterChange,
}}
keyField="id"
trClassName="tableRow"
containerClass={content.length > 0 ? 'fullTable' : undefined}
>
{tableHeaders.map(header => (
<TableHeaderColumn
filter={header.filter}
key={header.id}
dataField={header.id}
thStyle={{
whiteSpace: 'normal',
textAlign: 'center',
lineHeight: 2,
}}
dataFormat={header.date && this.dateFormatter}
width={header.width}
>
{header.name}
</TableHeaderColumn>
))}
</BootstrapTable>
I am using "react-bootstrap-table": "4.3.1"
.