From 0f5cb9f9d3ef7a6d22afd6e36075a3abae620849 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 24 Jun 2022 14:12:04 -0600 Subject: [PATCH] Select styling improvements - support for Shoelace's size property - relative sizing for EmailTag's add icon height --- api/js/etemplate/Et2Select/Et2Select.ts | 5 +++++ api/js/etemplate/Et2Select/Tag/Et2EmailTag.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 2f53ab6778..8fc20f7b91 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -93,6 +93,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2InvokerMixin(Et2WidgetWithS } /* Maximum height + scrollbar on tags (+ other styling) */ .select__tags { + margin-left: 0px; max-height: 5em; overflow-y: auto; @@ -437,6 +438,10 @@ export class Et2Select extends Et2WithSearchMixin(Et2InvokerMixin(Et2WidgetWithS tag.value = item.value; tag.textContent = this.getItemLabel(item); tag.class = item.classList.value + " search_tag"; + if(this.size) + { + tag.size = this.size; + } if(this.readonly) { tag.removable = false; diff --git a/api/js/etemplate/Et2Select/Tag/Et2EmailTag.ts b/api/js/etemplate/Et2Select/Tag/Et2EmailTag.ts index c51b7370bb..7cfa29f54b 100644 --- a/api/js/etemplate/Et2Select/Tag/Et2EmailTag.ts +++ b/api/js/etemplate/Et2Select/Tag/Et2EmailTag.ts @@ -31,7 +31,7 @@ export class Et2EmailTag extends Et2Tag .tag__prefix { display: none; - height: 16px; + height: 80%; background-color: white; background-repeat: no-repeat;