From 4ef0b1afe2ee339d3fdad307ae778b437e2c0f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Thu, 27 Nov 2025 13:12:27 +0100 Subject: [PATCH] fix: re-render report table --- .../components/report-chart/common/report-table.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/start/src/components/report-chart/common/report-table.tsx b/apps/start/src/components/report-chart/common/report-table.tsx index 8754e8fa..3e5f4667 100644 --- a/apps/start/src/components/report-chart/common/report-table.tsx +++ b/apps/start/src/components/report-chart/common/report-table.tsx @@ -676,8 +676,10 @@ export function ReportTable({ }, cell: ({ row }) => { const original = row.original; - const serieName = original.serieName; const serieId = original.serieId; + // Look up serie name directly from data to ensure we always have the latest value + const serie = data.series.find((s) => s.id === serieId); + const serieName = serie?.names[0] ?? original.serieName ?? ''; const isVisible = visibleSeriesIds.includes(serieId); const serieIndex = getSerieIndex(serieId); const color = getChartColor(serieIndex); @@ -1043,6 +1045,7 @@ export function ReportTable({ dateRanges, columnSizing, expanded, + data, ]); // Create a hash of column IDs to track when columns change @@ -1624,9 +1627,15 @@ export function ReportTable({ const tableRow = rowModelToUse.rows[virtualRow.index]; if (!tableRow) return null; + // Include serie name in key to force re-render when name changes + const serieId = tableRow.original.serieId; + const serie = data.series.find((s) => s.id === serieId); + const serieName = + serie?.names[0] ?? tableRow.original.serieName ?? ''; + return (