From e66c9512f1eba76cdbc316aa1f43b848ded33ab1 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 30 Nov 2023 10:49:49 -0700 Subject: [PATCH] Fix calendar participant select did not show selected tags while the dropdown was open Tags were only shown once dropdown was closed --- api/js/etemplate/Et2Select/Et2Select.ts | 5 ++--- api/js/etemplate/Et2Select/SearchMixin.ts | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 1e9952faae..1d09f7b013 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -115,13 +115,14 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect) /* Maximum height + scrollbar on tags (+ other styling) */ ::part(tags) { + overflow-y: auto; margin-left: 0px; max-height: initial; + min-height: auto; gap: 0.1rem 0.5rem; } :host([rows]) ::part(tags) { - overflow-y: auto; max-height: calc(var(--rows, 5) * (var(--sl-input-height-medium) * 0.8)) } @@ -132,9 +133,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect) /* No rows set, default height limit about 5 rows */ :host(:not([rows])) ::part(tags) { - min-height: inherit; max-height: 11em; - overflow-y: auto; } select:hover { diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 24f4b752ec..64b37eb557 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -151,11 +151,11 @@ export const Et2WithSearchMixin = dedupeMixin( display: none; } - :host([multiple]) sl-select[open]::part(tags) { + sl-select[open][multiple]::part(tags) { flex-basis: 100%; } - :host([multiple]) sl-select[open]::part(combobox) { + sl-select[open][multiple]::part(combobox) { flex-flow: wrap; }