give mod-watch-tool tables unique keys on fetch

fixes #47
This commit is contained in:
HF 2023-03-14 14:42:27 +01:00
parent f6e3fd60b3
commit 3cb9ec5c9f

View File

@ -96,7 +96,9 @@ function ModWatchtools() {
selectCanvas(canvasId);
}, [canvasId]);
const { columns, types, rows } = table;
const {
columns, types, rows, ts,
} = table;
const cidColumn = (types) ? (types.indexOf('cid')) : -1;
return (
@ -227,6 +229,7 @@ function ModWatchtools() {
columns: ret.columns,
types: ret.types,
rows: ret.rows,
ts: Date.now(),
});
}
},
@ -258,6 +261,7 @@ function ModWatchtools() {
columns: ret.columns,
types: ret.types,
rows: ret.rows,
ts: Date.now(),
});
}
},
@ -269,7 +273,7 @@ function ModWatchtools() {
</div>
<br />
{(rows && columns && types) && (
<React.Fragment key="pxltable">
<React.Fragment key={ts}>
<div className="modaldivider" />
<table style={{ fontSize: 11 }}>
<thead>