mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
Add column description to table viz (#4831)
* Add column description to table viz * Fix: misplaced super long titles tooltip.
This commit is contained in:
@@ -46,6 +46,14 @@ export default function ColumnEditor({ column, onChange }) {
|
||||
</Checkbox>
|
||||
</Section>
|
||||
|
||||
<Section>
|
||||
<Input
|
||||
label="Description"
|
||||
defaultValue={column.description}
|
||||
onChange={event => handleChangeDebounced({ description: event.target.value })}
|
||||
/>
|
||||
</Section>
|
||||
|
||||
<Section>
|
||||
<Select
|
||||
label="Display as:"
|
||||
|
||||
@@ -64,6 +64,13 @@ export function prepareColumns(columns, searchInput, orderBy, onOrderByChange) {
|
||||
align: column.alignContent,
|
||||
title: (
|
||||
<React.Fragment>
|
||||
{column.description && (
|
||||
<Tooltip placement="top" title={column.description} className="p-r-5">
|
||||
<div className="table-visualization-heading">
|
||||
<i className="fa fa-info-circle" aria-hidden="true"></i>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip placement="top" title={column.title}>
|
||||
<div className="table-visualization-heading" data-sort-column-index={sortColumnIndex}>
|
||||
{column.title}
|
||||
|
||||
Reference in New Issue
Block a user