From 37a55dacdab9be41a6d39473ac2922b9875cefe9 Mon Sep 17 00:00:00 2001 From: Boubrid Ihab Date: Mon, 23 May 2022 19:00:59 +0100 Subject: fix:generate unique key to index items on SummaryReport based on deviceId & startTime --- modern/src/reports/SummaryReportPage.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modern/src/reports/SummaryReportPage.js') diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js index 56e4c7ed..8bf03a9a 100644 --- a/modern/src/reports/SummaryReportPage.js +++ b/modern/src/reports/SummaryReportPage.js @@ -76,6 +76,9 @@ const SummaryReportPage = () => { return item[key]; } }; + const generateKey = (item) => { + return `${ item.deviceId }_${Date.parse(item.startTime)}`; + } return ( } breadcrumbs={['reportTitle', 'reportSummary']}> @@ -99,7 +102,7 @@ const SummaryReportPage = () => { {items.map((item) => ( - + {columns.map((key) => ( {formatValue(item, key)} -- cgit v1.2.3