I tried using the code in the react-bootstrap-table2 "Table with caption" example, but my caption is below the table. I found this answer: "That's because bootstrap 4 has default caption css style - caption-side: bottom", but it's not about react-bootstrap-table2 and it doesn't give an example. Then I found this page: caption-side.
So I created tables.css
:
.top caption {
caption-side: top;
}
I imported it using import './tables.css';
. And I added the class name to my table:
<BootstrapTable
className="top"
bootstrap4={ true }
caption={ <CaptionElement /> }
keyField='id'
data={ data.team.bids }
columns={ columns }
striped
hover />
But the caption is still under the table.
How do I get the caption to be above the table?