100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
make sort button optional
Vincent1a94c1698357
diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.tsindex 2d27efafd..9c281892d 100644--- a/ui/component/or-asset-tree/src/index.ts+++ b/ui/component/or-asset-tree/src/index.ts@@ -236,6 +236,9 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {@property({type: Array})public selectedIds?: string[];+ @property({type: Boolean})+ public showSortBtn?: boolean = true;+@property({type: String})public sortBy?: string = "name";@@ -310,7 +313,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {<or-input hidden type="${InputType.BUTTON}" icon="magnify" @click="${() => this._onSearchClicked()}"></or-input>${getContentWithMenuTemplate(- html`<or-input type="${InputType.BUTTON}" icon="sort-variant"></or-input>`,+ html`<or-input type="${InputType.BUTTON}" icon="sort-variant" ?hidden="${!this.showSortBtn}"></or-input>`,["name", "type", "createdOn", "status"].map((sort) => { return {value: sort, text: i18next.t(sort)} as MenuItem; }),this.sortBy,(v) => this._onSortClicked(v as string))}