AllenFang / AllenFang/react-bootstrap-table

Cannot set background color of unselectable row

Aberta
#1,962 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
2.2k
Forks
761
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.