feature(explore/table): Add tooltips to explore table (#16007)

Longer labels are now viewable as a tooltip in the Explore table

Signed-off-by: Steven Sheehy <ssheehy@firescope.com>
This commit is contained in:
Steven Sheehy 2019-03-15 08:11:40 -05:00 committed by David
parent 011e8c4a35
commit fff6e0a522

View File

@ -40,11 +40,15 @@ export default class Table extends PureComponent<TableProps> {
const tableModel = data || EMPTY_TABLE;
const columnNames = tableModel.columns.map(({ text }) => text);
const columns = tableModel.columns.map(({ filterable, text }) => ({
Header: text,
Header: () => <span title={text}>{text}</span>,
accessor: text,
className: VALUE_REGEX.test(text) ? 'text-right' : '',
show: text !== 'Time',
Cell: row => <span className={filterable ? 'link' : ''}>{row.value}</span>,
Cell: row => (
<span className={filterable ? 'link' : ''} title={text + ': ' + row.value}>
{row.value}
</span>
),
}));
const noDataText = data ? 'The queries returned no data for a table.' : '';