From 5435218187b5086e13bdb98fcab4c75749dc2e7e Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 9 Feb 2022 17:58:37 +0100 Subject: [PATCH] Make textarea grow on input (#11618) --- .../ha-selector/ha-selector-text.ts | 11 ++-- src/components/ha-textarea.ts | 60 +++++++++++++++++++ 2 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 src/components/ha-textarea.ts diff --git a/src/components/ha-selector/ha-selector-text.ts b/src/components/ha-selector/ha-selector-text.ts index 7431c05833..565ef8889e 100644 --- a/src/components/ha-selector/ha-selector-text.ts +++ b/src/components/ha-selector/ha-selector-text.ts @@ -1,4 +1,3 @@ -import "@material/mwc-textarea/mwc-textarea"; import { mdiEye, mdiEyeOff } from "@mdi/js"; import { css, CSSResultGroup, html, LitElement } from "lit"; import { customElement, property, state } from "lit/decorators"; @@ -6,6 +5,7 @@ import { fireEvent } from "../../common/dom/fire_event"; import { StringSelector } from "../../data/selector"; import { HomeAssistant } from "../../types"; import "../ha-icon-button"; +import "../ha-textarea"; import "../ha-textfield"; @customElement("ha-selector-text") @@ -26,7 +26,7 @@ export class HaTextSelector extends LitElement { protected render() { if (this.selector.text?.multiline) { - return html``; + autogrow + >`; } return html`