* product: bug #38848, fix nested data structure.

This commit is contained in:
sunhao
2023-09-21 17:10:01 +08:00
parent d94c7263ad
commit f737075fa9
+6 -1
View File
@@ -188,7 +188,11 @@ function setStatistics()
}
cols = JSON.parse(cols);
data = JSON.parse(data);
data = JSON.parse(data).map(function(row)
{
row.key = row.parent ? (row.parent + '-' + row.id) : row.id;
return row;
});
const options =
{
striped: true,
@@ -197,6 +201,7 @@ const options =
sortLink: createSortLink,
cols: cols,
data: data,
rowKey: 'key',
footer: false,
responsive: true,
onCheckChange: setStatistics,