From 2bbac91254fe5390063ff9949200e3605b4d2ce1 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 14 Feb 2024 15:26:39 -0700 Subject: [PATCH] Et2TreeDropdown fixes - Fix ID / tag could be doubled by selecting the same tree node multiple times - Fix global categories had their marker escaped --- api/js/etemplate/Et2Tree/Et2TreeDropdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts index 55a7e23f02..3a1185c9c0 100644 --- a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts +++ b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts @@ -353,7 +353,7 @@ export class Et2TreeDropdown extends Et2WidgetWithSelectMixin(LitElement) else { const id = event?.detail?.selection?.map(i => i.id).pop(); - if(id) + if(id && !this.value.includes(id)) { // Copy so LitElement knows it changed this.value = [...this.value, id]; @@ -468,7 +468,7 @@ export class Et2TreeDropdown extends Et2WidgetWithSelectMixin(LitElement) @click=${typeof this.onTagClick == "function" ? (e) => this.onTagClick(e, e.target) : nothing} > ${image ?? nothing} - ${option.text.trim()} + ${(option.label ?? option.text).trim()} `; }