From 004705a10b2b95eb03ad47cf44e257fc5b89f093 Mon Sep 17 00:00:00 2001 From: Oscar Kilhed Date: Tue, 17 Jan 2023 14:05:58 +0100 Subject: [PATCH] Table Panel: Fix image of image cell overflowing table cell when a data link is added. (#59392) * TablePanel: fix image of image cell overflowing table cell when a data link is added * Fix image cell and gauge panel in respective places instead --- .../src/components/DataLinks/DataLinksContextMenu.tsx | 2 +- packages/grafana-ui/src/components/Table/ImageCell.tsx | 2 +- public/app/plugins/panel/gauge/GaugePanel.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx b/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx index 992ba6de058..f692a2ff568 100644 --- a/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx +++ b/packages/grafana-ui/src/components/DataLinks/DataLinksContextMenu.tsx @@ -62,7 +62,7 @@ export const DataLinksContextMenu = ({ children, links, style }: DataLinksContex onClick={linkModel.onClick} target={linkModel.target} title={linkModel.title} - style={{ ...style, overflow: 'hidden', display: 'flex', flexGrow: 1 }} + style={{ ...style, overflow: 'hidden', display: 'flex' }} aria-label={selectors.components.DataLinksContextMenu.singleLink} > {children({})} diff --git a/packages/grafana-ui/src/components/Table/ImageCell.tsx b/packages/grafana-ui/src/components/Table/ImageCell.tsx index 6961be2fe22..c1e8b2ee2f1 100644 --- a/packages/grafana-ui/src/components/Table/ImageCell.tsx +++ b/packages/grafana-ui/src/components/Table/ImageCell.tsx @@ -17,7 +17,7 @@ export const ImageCell: FC = (props) => {
{!hasLinks && } {hasLinks && ( - getCellLinks(field, row) || []}> + getCellLinks(field, row) || []}> {(api) => { return (
diff --git a/public/app/plugins/panel/gauge/GaugePanel.tsx b/public/app/plugins/panel/gauge/GaugePanel.tsx index e5766087ef2..bbe3094e5cf 100644 --- a/public/app/plugins/panel/gauge/GaugePanel.tsx +++ b/public/app/plugins/panel/gauge/GaugePanel.tsx @@ -41,7 +41,7 @@ export class GaugePanel extends PureComponent> { if (hasLinks && getLinks) { return ( - + {(api) => { return this.renderComponent(valueProps, api); }}