feat: table column title hover (#8255)

added title prop to span to show hoverValue
This commit is contained in:
hallidayo authored and GitHub committed 2022-09-26 15:41:08 +02:00
1 parent 6a11672a23
commit 4279b014e9
1 file changed
+4 -1
@@ -19,6 +19,7 @@ export function ColumnHeader<R>({
const columnKey = column.key
const columnFormat = getColumnFormat(columnType, format)
const state = useTrackedState()
const hoverValue = column.name as string
// keep state.gridColumns' order in sync with data grid component
if (state.gridColumns[columnIdx].key != columnKey) {
@@ -122,7 +123,9 @@ export function ColumnHeader<R>({
<IconKey size="tiny" strokeWidth={2} />
</div>
)}
<span className="sb-grid-column-header__inner__name">{column.name}</span>
<span className="sb-grid-column-header__inner__name" title={hoverValue}>
{column.name}
</span>
<span className="sb-grid-column-header__inner__format">{columnFormat}</span>
</div>
<ColumnMenu column={column} />