Et2Email: Add max height + scrollbar to tag list

use --height CSS var to override
This commit is contained in:
nathan 2024-01-03 09:06:17 -07:00
parent 82ae337940
commit 014753372b
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,8 @@ export default css`
border-radius: var(--sl-input-border-radius-medium);
font-size: var(--sl-input-font-size-medium);
min-height: var(--sl-input-height-medium);
max-height: calc(var(--height, 2.5) * var(--sl-input-height-medium));
overflow-y: auto;
padding-block: 0;
padding-inline: var(--sl-input-spacing-medium);
padding-top: 0.1rem;

View File

@ -62,6 +62,8 @@ import Sortable from "sortablejs/modular/sortable.complete.esm.js";
* @csspart input - The input element
* @csspart option - Each matching email address suggestion
* @csspart tag - The individual tags that represent each email address.
*
* @cssproperty [--height=2.5] - The maximum height of the widget, to limit size when you have a lot of addresses.
*/
export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinInterface
{