diff --git a/packages/react-bootstrap-table2/src/cell.js b/packages/react-bootstrap-table2/src/cell.js
index dc535a715..bfd61d5c8 100644
--- a/packages/react-bootstrap-table2/src/cell.js
+++ b/packages/react-bootstrap-table2/src/cell.js
@@ -88,7 +88,9 @@ class Cell extends Component {
cellAttrs.onDoubleClick = this.handleEditingCell;
}
return (
-
{ content } |
+
+ { typeof content === 'boolean' ? `${content}` : content }
+ |
);
}
}
diff --git a/packages/react-bootstrap-table2/test/cell.test.js b/packages/react-bootstrap-table2/test/cell.test.js
index 439a638b2..169524024 100644
--- a/packages/react-bootstrap-table2/test/cell.test.js
+++ b/packages/react-bootstrap-table2/test/cell.test.js
@@ -27,6 +27,25 @@ describe('Cell', () => {
});
});
+ describe('when content is bool value', () => {
+ const column = {
+ dataField: 'col1',
+ text: 'column 1'
+ };
+ const aRowWithBoolValue = { col1: true };
+
+ beforeEach(() => {
+ wrapper = shallow(
+ |
+ );
+ });
+
+ it('should render successfully', () => {
+ expect(wrapper.length).toBe(1);
+ expect(wrapper.text()).toEqual(aRowWithBoolValue[column.dataField].toString());
+ });
+ });
+
describe('when column.formatter prop is defined', () => {
const rowIndex = 1;
const column = {