mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 05:10:56 +08:00
@ -280,8 +280,11 @@ export function TableNG(props: TableNGProps) {
|
|||||||
|
|
||||||
// Helper function to get displayed value
|
// Helper function to get displayed value
|
||||||
const getDisplayedValue = (row: TableRow, key: string) => {
|
const getDisplayedValue = (row: TableRow, key: string) => {
|
||||||
const field = props.data.fields.find((field) => field.name === key)!;
|
const field = props.data.fields.find((field) => getDisplayName(field) === key);
|
||||||
const displayedValue = formattedValueToString(field.display!(row[key]));
|
if (!field || !field.display) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
const displayedValue = formattedValueToString(field.display(row[key]));
|
||||||
return displayedValue;
|
return displayedValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user