TablePanel: Fix JSON tooltip positioning (#24420)

* Fix block element and overflow

* Width not needed

* Add to styles file
This commit is contained in:
Tobias Skarhed 2020-05-08 12:11:41 +02:00 committed by GitHub
parent 243fa5ea63
commit f714357fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,7 @@ export const JSONViewCell: FC<TableCellProps> = props => {
return (
<div className={cx(txt, tableStyles.tableCell)}>
<Tooltip placement="auto" content={content} theme={'info'}>
<span>{displayValue}</span>
<div className={tableStyles.overflow}>{displayValue}</div>
</Tooltip>
</div>
);

View File

@ -17,6 +17,7 @@ export interface TableStyles {
row: string;
theme: GrafanaTheme;
resizeHandle: string;
overflow: string;
}
export const getTableStyles = stylesFactory(
@ -92,6 +93,10 @@ export const getTableStyles = stylesFactory(
white-space: nowrap;
overflow: hidden;
`,
overflow: css`
overflow: hidden;
text-overflow: ellipsis;
`,
resizeHandle: css`
label: resizeHandle;
cursor: col-resize !important;