AllenFang / AllenFang/react-bootstrap-table

return popover element on dataFormat

未关闭
#2,036 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
2.2k
派生
761
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。