imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.

Home Page:https://imballinst.github.io/react-bs-datatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tableClass property not being applied

revengeofthepencil opened this issue · comments

Nice plugin, thanks for all the work you put into it!

I am having a problem with the tableClass parameter. I am passing a custom class but, no matter what I do, I always end up with the table having the class "table table-datatable__root". This is even the case in the examples on the demo page. When I inspect the table from the example at https://imballinst.github.io/react-bs-datatable/?path=/story/getting-started--filter-sort-and-pagination, it does have that default class despite the fact that custom classes are being passed. It looks like this parameter is just being ignored.

hello @revengeofthepencil, thank you for reporting the problem! I'll check it out around this weekend and get back to you when I find the problem.

So apparently I forgot to remove the prop tableClass. To add a class to the table tag, now we use classes.table. For example: https://codesandbox.io/s/v210-alpha2-ghv0s.

In the meantime, I'll update the docs so it's not misleading: #61.