AllenFang / AllenFang/react-bootstrap-table

Cannot set background color of unselectable row

Đang mở
#1,962 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
2.2k
Fork
761
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```
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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.