Skip to content
Advertisement

check boxes are not functioning in react-bootstrap-table-next

I am using react-bootstrap-table2, to make tables, I have encounter an issue i.e

I want o have a checkbox inside my table, so I am following This, mention in the documentation, but I am getting unexpected result.

My code

For selecting the row

JavaScript

Table rendering

JavaScript

I Think issue is coming because of my data, as it is nested one And I am rendering it, but I am not able to resolve it.

My data

JavaScript

];

Here is my code sandbox link This

Advertisement

Answer

You’re telling keyField="id" yet each of your rowsData has no id. Give each of them an id and it should work.

Edit holy-feather-s0upd

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement