diff --git a/public/app/plugins/panel/table/table-new/TablePanel.tsx b/public/app/plugins/panel/table/table-new/TablePanel.tsx index 018fbed4146..711d2d50579 100644 --- a/public/app/plugins/panel/table/table-new/TablePanel.tsx +++ b/public/app/plugins/panel/table/table-new/TablePanel.tsx @@ -1,4 +1,5 @@ import { css } from '@emotion/css'; +import { useMemo } from 'react'; import { ActionModel, @@ -27,7 +28,9 @@ interface Props extends PanelProps {} export function TablePanel(props: Props) { const { data, height, width, options, fieldConfig, id, timeRange, replaceVariables } = props; - cacheFieldDisplayNames(data.series); + useMemo(() => { + cacheFieldDisplayNames(data.series); + }, [data.series]); const theme = useTheme2(); const panelContext = usePanelContext();