Display complete cell contents on hover

Doing this old school way with title & alt attributes
pull/10616/head
Alex P 2018-03-20 18:41:51 -07:00
parent 1da2fae1db
commit 582ec608e4
1 changed files with 7 additions and 3 deletions

View File

@ -148,16 +148,20 @@ class TableGraph extends Component {
const columnName =
foundColumn && (foundColumn.displayName || foundColumn.internalName)
const cellContents = isTimeData
? `${moment(cellData).format(timeFormat)}`
: columnName || `${cellData}`
return (
<div
key={key}
style={cellStyle}
className={cellClass}
onMouseOver={this.handleHover(columnIndex, rowIndex)}
title={cellContents}
alt={cellContents}
>
{isTimeData
? `${moment(cellData).format(timeFormat)}`
: columnName || `${cellData}`}
{cellContents}
</div>
)
}