Skip to content

armgit / core

Public Imported from GitHub
0

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

UI updates: Sort the options in the attribute history panel (#1003)

DonWillems43e0c9938ffc
diff --git a/ui/component/or-asset-viewer/src/index.ts b/ui/component/or-asset-viewer/src/index.ts
index 844c9ad5b..a04eb7cd8 100644
--- a/ui/component/or-asset-viewer/src/index.ts
+++ b/ui/component/or-asset-viewer/src/index.ts
@@ -574,7 +574,7 @@ function getPanelContent(id: string, assetInfo: AssetInfo, hostElement: LitEleme
const descriptors = AssetModelUtil.getAttributeAndValueDescriptors(asset.type, attr.name, attr);
const label = Util.getAttributeLabel(attr, descriptors[0], asset.type, true);
return [attr.name, label];
- });
+ }).sort(Util.sortByString((item) => item[1] === undefined ? item[0]! : item[1]));
let attrTemplate = html`
<div id="attribute-picker">