From 8258641443b576a69a38f01dc76ead47b5364ec6 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 7 Mar 2022 14:55:44 +0100 Subject: [PATCH] Make min width of select configurable (#11965) --- src/components/ha-select.ts | 3 +++ src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/ha-select.ts b/src/components/ha-select.ts index 59269bde4a..b90133b8eb 100644 --- a/src/components/ha-select.ts +++ b/src/components/ha-select.ts @@ -44,6 +44,9 @@ export class HaSelect extends SelectBase { .mdc-select:not(.mdc-select--disabled) .mdc-select__icon { color: var(--secondary-text-color); } + .mdc-select__anchor { + width: var(--ha-select-min-width, 200px); + } `, ]; } diff --git a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts index 0b88452129..1db8a8c1b6 100644 --- a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.ts @@ -87,6 +87,7 @@ class HuiInputSelectEntityRow extends LitElement implements LovelaceRow { } ha-select { width: 100%; + --ha-select-min-width: 0; } `;