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: Asset tree respect ctrl/shift key during drag and drop (#882)

Jérôme Vervier1a130ab26976
diff --git a/ui/component/or-asset-tree/src/index.ts b/ui/component/or-asset-tree/src/index.ts
index f8316cb72..96cf10c2e 100644
--- a/ui/component/or-asset-tree/src/index.ts
+++ b/ui/component/or-asset-tree/src/index.ts
@@ -1814,6 +1814,9 @@ export class OrAssetTree extends subscribe(manager)(LitElement) {
}
if (selectedId && this.selectedIds && !this.selectedIds.includes(selectedId)) {
+ if (!ev.ctrlKey && !ev.shiftKey) {
+ this.selectedIds = [];
+ }
this.selectedIds.push(selectedId);
}
}