AllenFang / AllenFang/react-bootstrap-table

Cannot set background color of unselectable row

Open
#1,962 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
761
PR merge metrics
No merged PRs in 30d

Description

```
const selectRowProp = {
mode: 'checkbox',
clickToSelect: true,
onSelect: onRowSelect,
onSelectAll: onSelectAll,
selected: selected,
unselectable: unselectable,
bgColor: (row, isSelect) => {
const {id} = row;
if(unselectable.includes(id)) {
return 'red'
}
}
};
```
This piece of code do not work. However, If I change `unselectable.includes(id)` to `!unselectable.includes(id)`, then the selectable rows can be set red.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.