Add default key to table rows

This commit is contained in:
Alex Holliday committed 2025-01-21 15:39:49 -08:00
1 parent 9535ffa192
commit f5480cbfba
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -82,9 +82,10 @@ const DataTable = ({ headers, data, config = { emptyView: "No data" } }) => {
</TableRow>
) : (
data.map((row) => {
const key = row.id || row._id || Math.random();
return (
<TableRow
key={row.id}
key={key}
sx={config?.rowSX ?? {}}
onClick={() => config?.onRowClick(row)}
>
@@ -59,6 +59,7 @@ const IncidentTable = ({ monitors, selectedMonitor, filter }) => {
rowsPerPage,
});
}
setChecks(res.data.data.checks);
setChecksCount(res.data.data.checksCount);
} catch (error) {