I am trying to use react-bootstrap OverlayTrigger and Tooltip inside of a formatter for react-bootstrap-table and keep getting the following error:
OverlayTrigger\'s
I had the same problem. I can't explain why but I simply solved by adding a tag inside OverlayTrigger tag. My formatter function is inside a React Class.
My solution:
tooltipFormatter(cell, row){
return (<OverlayTrigger placement="right" overlay={<Tooltip id={String(row.id)}>{cell}</Tooltip>}><span>{cell}</span></OverlayTrigger>);
};
Here, span tag solved the problem.
If I adapt your code, here's the solution :
submitterFormatter(submitter, row){
return (<OverlayTrigger placement="bottom" overlay={<Tooltip id={String(row.id)}>{submitter}</Tooltip>}><span>{submitter}</span></OverlayTrigger>);
};
Then, when I call in dataFormat parameter of TableHeaderColumn:
<TableHeaderColumn dataField="comment" dataFormat={this.tooltipFormatter}>TableHeader</TableHeaderColumn>
It's likely that either submitter or toolTipInstance are either null/undefined or one of them is an array of more than 1 component.