mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06:00
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
This commit is contained in:
parent
766fa4e7d5
commit
004705a10b
@ -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({})}
|
||||
|
@ -17,7 +17,7 @@ export const ImageCell: FC<TableCellProps> = (props) => {
|
||||
<div {...cellProps} className={tableStyles.cellContainer}>
|
||||
{!hasLinks && <img src={displayValue.text} className={tableStyles.imageCell} alt="" />}
|
||||
{hasLinks && (
|
||||
<DataLinksContextMenu links={() => getCellLinks(field, row) || []}>
|
||||
<DataLinksContextMenu style={{ height: '100%' }} links={() => getCellLinks(field, row) || []}>
|
||||
{(api) => {
|
||||
return (
|
||||
<div onClick={api.openMenu} className={cx(tableStyles.imageCellLink, api.targetClassName)}>
|
||||
|
@ -41,7 +41,7 @@ export class GaugePanel extends PureComponent<PanelProps<PanelOptions>> {
|
||||
|
||||
if (hasLinks && getLinks) {
|
||||
return (
|
||||
<DataLinksContextMenu links={getLinks}>
|
||||
<DataLinksContextMenu links={getLinks} style={{ flexGrow: 1 }}>
|
||||
{(api) => {
|
||||
return this.renderComponent(valueProps, api);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user