From 4ff80d541ba88177d2af1a934cd2541f7b102053 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 29 Oct 2020 19:28:38 +0530 Subject: [PATCH] Table: Fix image cell mode so that it works with value mappings (#28644) (#28651) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1e51d33d859627a532d8107ddeff7abadf8c1e4f) Co-authored-by: Torkel Ödegaard --- packages/grafana-ui/src/components/Table/ImageCell.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/grafana-ui/src/components/Table/ImageCell.tsx b/packages/grafana-ui/src/components/Table/ImageCell.tsx index 6ddfb318d02..ea137715b11 100644 --- a/packages/grafana-ui/src/components/Table/ImageCell.tsx +++ b/packages/grafana-ui/src/components/Table/ImageCell.tsx @@ -2,11 +2,13 @@ import React, { FC } from 'react'; import { TableCellProps } from './types'; export const ImageCell: FC = props => { - const { cell, tableStyles, cellProps } = props; + const { field, cell, tableStyles, cellProps } = props; + + const displayValue = field.display!(cell.value); return (
- +
); };