Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

readable column names

Vincent280c3a2edfbb
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index f84d1d867..c9f28d7c5 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -622,9 +622,9 @@ export class OrAssetViewer extends subscribe(manager)(translate(i18next)(LitElem
// Update table properties which will cause a re-render
loadingMsg.hidden = true;
attributeTable.hidden = false;
- attributeTable.headers = [...selectedAttributes].sort();
+ attributeTable.headers = [...selectedAttributes].sort().map((header) => i18next.t(header));
attributeTable.rows = childAssets.map((asset) => {
- return attributeTable.headers!.map((attributeName) => {
+ return [...selectedAttributes].sort().map((attributeName) => {
return asset.attributes![attributeName] ? asset.attributes![attributeName].value! as string : "";
});
});