AllenFang / AllenFang/react-bootstrap-table

return popover element on dataFormat

Aberta
#2,036 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

I am trying to return popover using an overlay within `dataFormat` option and it does not seem to work.

```
serviceFormatter(cell, row) {
let exemptionType = 'CM';
if( (row.comms_matrix_id == null || row.comms_matrix_id == '0' ) && (row.service_id == null || row.service_id == 'All' || row.service_id == '0')){
exemptionType = 'Global';
}else if( (row.comms_matrix_id == null || row.comms_matrix_id == '0') && (row.service_id != null || row.service_id != 'All' || row.service_id != '0' )){
exemptionType = 'Service';
}

let exemptionTypeText = row.service + `${exemptionType}`;

if(cell && cell.length> 0){
exemptionTypeText = row.service + `${exemptionType}`;
}
let popover = {exemptionType} exemption
return (

{exemptionTypeText}

);
}
```

the error i get is

`Uncaught Error: React.Children.only expected to receive a single React element child.`

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.