0

I am trying to add an id for the Bootstraptable tag of react-bootstrap-table module. I saw the props. there is a tablebodyclass prop in which we can set the class name. But i want the table to be unique. How shall i introduce Id for the table?

2 Answers2

0

Give add to the top of table

<table id="test">
    <tr>
        <td></td>
    </tr>
</table>
0

If someone stumbles into this question with "react-bootstrap-table-next": "^4.0.3"

<BootstrapTable id="someID" ... />

This works charm

Inspect result :

<table id="someID" class="table table-bordered table-condensed"><thead> ... </thead><table>
Hem M
  • 326
  • 2
  • 13