Commit f714357f by Tobias Skarhed Committed by GitHub

TablePanel: Fix JSON tooltip positioning (#24420)

* Fix block element and overflow

* Width not needed

* Add to styles file
parent 243fa5ea
...@@ -21,7 +21,7 @@ export const JSONViewCell: FC<TableCellProps> = props => { ...@@ -21,7 +21,7 @@ export const JSONViewCell: FC<TableCellProps> = props => {
return ( return (
<div className={cx(txt, tableStyles.tableCell)}> <div className={cx(txt, tableStyles.tableCell)}>
<Tooltip placement="auto" content={content} theme={'info'}> <Tooltip placement="auto" content={content} theme={'info'}>
<span>{displayValue}</span> <div className={tableStyles.overflow}>{displayValue}</div>
</Tooltip> </Tooltip>
</div> </div>
); );
......
...@@ -17,6 +17,7 @@ export interface TableStyles { ...@@ -17,6 +17,7 @@ export interface TableStyles {
row: string; row: string;
theme: GrafanaTheme; theme: GrafanaTheme;
resizeHandle: string; resizeHandle: string;
overflow: string;
} }
export const getTableStyles = stylesFactory( export const getTableStyles = stylesFactory(
...@@ -92,6 +93,10 @@ export const getTableStyles = stylesFactory( ...@@ -92,6 +93,10 @@ export const getTableStyles = stylesFactory(
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
`, `,
overflow: css`
overflow: hidden;
text-overflow: ellipsis;
`,
resizeHandle: css` resizeHandle: css`
label: resizeHandle; label: resizeHandle;
cursor: col-resize !important; cursor: col-resize !important;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment