Skip to content

armgit / core

Public Imported from GitHub
0

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

remove deselect button

Vincentf8bb1821a972
diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.ts
index 908747dc8..648ffc7be 100644
--- a/ui/component/or-asset-tree/src/index.ts
+++ b/ui/component/or-asset-tree/src/index.ts
@@ -305,8 +305,7 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
<or-translate id="title" value="asset_plural"></or-translate>
</div>
- <div id="header-btns">
- <or-input ?hidden="${!this.selectedIds || this.selectedIds.length === 0}" type="${InputType.BUTTON}" icon="close" @click="${() => this._onDeselectClicked()}"></or-input>
+ <div id="header-btns">
<or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length !== 1}" type="${InputType.BUTTON}" icon="content-copy" @click="${() => this._onCopyClicked()}"></or-input>
<or-input ?hidden="${this._isReadonly() || !this.selectedIds || this.selectedIds.length === 0 || this.selectedNodes.some((node) => this.isAncestorSelected(node))}" type="${InputType.BUTTON}" icon="delete" @click="${() => this._onDeleteClicked()}"></or-input>
<or-input ?hidden="${this._isReadonly() || !this._canAdd()}" type="${InputType.BUTTON}" icon="plus" @click="${() => this._onAddClicked()}"></or-input>
@@ -478,10 +477,6 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
}
}
- protected _onDeselectClicked() {
- this._onNodeClicked(null, null);
- }
-
protected async _onCopyClicked() {
if (this._selectedNodes.length !== 1) {
return;