AllenFang / AllenFang/react-bootstrap-table
return popover element on dataFormat
- 主要語言
- 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 (
);
}
```
the error i get is
`Uncaught Error: React.Children.only expected to receive a single React element child.`
貢獻指南
評估
這個 Issue 還沒有評估資料。