[v11.1.x] Table Panel: Fix Image hover without datalinks (#89922)

Table Panel: Fix Image hover without datalinks (#89751)

* Fix image hover

* Prettier

* Fix height offset

(cherry picked from commit c575c06d63)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-07-01 20:11:48 +03:00
committed by GitHub
co-authored by Kyle Cunningham
parent 81c03daac3
commit 5510541ae7
@@ -16,7 +16,14 @@ export const ImageCell = (props: TableCellProps) => {
return (
<div {...cellProps} className={tableStyles.cellContainer}>
{!hasLinks && <img src={displayValue.text} className={tableStyles.imageCell} alt="" />}
{!hasLinks && (
<img
style={{ height: tableStyles.cellHeight - DATALINKS_HEIGHT_OFFSET, width: 'auto' }}
src={displayValue.text}
className={tableStyles.imageCell}
alt=""
/>
)}
{hasLinks && (
<DataLinksContextMenu
style={{ height: tableStyles.cellHeight - DATALINKS_HEIGHT_OFFSET, width: 'auto' }}