diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2022-05-23 15:16:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 15:16:37 -0700 |
commit | dd278e99eabeec8c4209bb25078721d86ed8b739 (patch) | |
tree | 0b87afa3d415005f0088333f534a054626997be3 | |
parent | ebbf8eac7bb65812ebdaf80d833faf976212d087 (diff) | |
parent | 3f842a3691419c5d18504960408085b8e5a52bd7 (diff) | |
download | trackermap-web-dd278e99eabeec8c4209bb25078721d86ed8b739.tar.gz trackermap-web-dd278e99eabeec8c4209bb25078721d86ed8b739.tar.bz2 trackermap-web-dd278e99eabeec8c4209bb25078721d86ed8b739.zip |
Merge pull request #936 from BIhab/fix-key-issue
Fix reports children key issue
-rw-r--r-- | modern/src/reports/EventReportPage.js | 2 | ||||
-rw-r--r-- | modern/src/reports/StopReportPage.js | 2 | ||||
-rw-r--r-- | modern/src/reports/SummaryReportPage.js | 2 | ||||
-rw-r--r-- | modern/src/reports/TripReportPage.js | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js index 6a1fe309..2745e657 100644 --- a/modern/src/reports/EventReportPage.js +++ b/modern/src/reports/EventReportPage.js @@ -116,7 +116,7 @@ const EventReportPage = () => { multiple > {typesArray.map(([key, string]) => ( - <MenuItem value={key}>{t(string)}</MenuItem> + <MenuItem key={key} value={key}>{t(string)}</MenuItem> ))} </Select> </FormControl> diff --git a/modern/src/reports/StopReportPage.js b/modern/src/reports/StopReportPage.js index 4cf29035..55091292 100644 --- a/modern/src/reports/StopReportPage.js +++ b/modern/src/reports/StopReportPage.js @@ -85,7 +85,7 @@ const StopReportPage = () => { </TableHead> <TableBody> {items.map((item) => ( - <TableRow key={item.id}> + <TableRow key={item.positionId}> {columns.map((key) => ( <TableCell key={key}> {formatValue(item, key)} diff --git a/modern/src/reports/SummaryReportPage.js b/modern/src/reports/SummaryReportPage.js index bd27bf26..49fc7bb1 100644 --- a/modern/src/reports/SummaryReportPage.js +++ b/modern/src/reports/SummaryReportPage.js @@ -100,7 +100,7 @@ const SummaryReportPage = () => { </TableHead> <TableBody> {items.map((item) => ( - <TableRow key={item.id}> + <TableRow key={(`${item.deviceId}_${Date.parse(item.startTime)}`)}> {columns.map((key) => ( <TableCell key={key}> {formatValue(item, key)} diff --git a/modern/src/reports/TripReportPage.js b/modern/src/reports/TripReportPage.js index 4846afa6..773e7510 100644 --- a/modern/src/reports/TripReportPage.js +++ b/modern/src/reports/TripReportPage.js @@ -94,7 +94,7 @@ const TripReportPage = () => { </TableHead> <TableBody> {items.map((item) => ( - <TableRow key={item.id}> + <TableRow key={item.startPositionId}> {columns.map((key) => ( <TableCell key={key}> {formatValue(item, key)} |