From 1294220e7e7d2cf902460891e3dd6401a3aedfd5 Mon Sep 17 00:00:00 2001
From: nathan <nathangray.bsc+github@gmail.com>
Date: Wed, 18 Sep 2024 10:42:16 -0600
Subject: [PATCH] Et2TreeDropdown style fixes - multiple display of placeholder
 - vertical alignment of tags when there's only 1 row of them

---
 api/js/etemplate/Et2Tree/Et2TreeDropdown.styles.ts | 7 ++-----
 api/js/etemplate/Et2Tree/Et2TreeDropdown.ts        | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdown.styles.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdown.styles.ts
index 730ed8ba88..bb32e4518f 100644
--- a/api/js/etemplate/Et2Tree/Et2TreeDropdown.styles.ts
+++ b/api/js/etemplate/Et2Tree/Et2TreeDropdown.styles.ts
@@ -147,7 +147,8 @@ export default css`
 		flex-wrap: wrap;
 		align-content: center;
 		gap: 0.1rem 0.5rem;
-		padding-top: var(--sl-spacing-3x-small);
+		margin-top: 1px;
+		padding: var(--sl-spacing-3x-small) 0;
 		max-height: calc(var(--height, 5) * var(--sl-input-height-medium));
 		min-width: 0px;
 	}
@@ -191,10 +192,6 @@ export default css`
 		cursor: text;
 	}
 
-	:host(:not([open])) .tree-dropdown--has-value.tree-dropdown--multiple .tree-dropdown__search {
-		visibility: hidden;
-	}
-
 	.tree-dropdown--disabled .tree-dropdown__search {
 		cursor: not-allowed;
 	}
diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts
index 29c73dca98..b476c8bdf7 100644
--- a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts
+++ b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts
@@ -718,7 +718,7 @@ export class Et2TreeDropdown extends SearchMixin<Constructor<any> & Et2InputWidg
 	{
 		let placeholder = this.egw().lang("search");
 		let image : symbol | TemplateResult = nothing;
-		if(this.disabled || this.readonly || (this.open && this.value))
+		if(this.disabled || this.readonly || (this.open && this.value) || (this.multiple && this.value.length > 0))
 		{
 			placeholder = "";
 		}