From 1e130c2001cab533002955d3d3e6e9b92f990730 Mon Sep 17 00:00:00 2001 From: mimshins Date: Tue, 6 May 2025 21:17:43 +0330 Subject: [PATCH 1/2] fix sync height issues --- packages/web-components/src/text-area/text-area.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/web-components/src/text-area/text-area.ts b/packages/web-components/src/text-area/text-area.ts index 840d34be..c2b65dfb 100644 --- a/packages/web-components/src/text-area/text-area.ts +++ b/packages/web-components/src/text-area/text-area.ts @@ -133,10 +133,10 @@ export class TextArea extends BaseTextInput { this._resizeSensor?.disconnect(); } - protected override firstUpdated(changed: PropertyValues): void { - super.firstUpdated(changed); + protected override updated(changed: PropertyValues): void { + super.updated(changed); - if (this.value) this._syncHeights(); + if (changed.has("value")) this._syncHeights(); } /** @internal */ @@ -225,12 +225,10 @@ export class TextArea extends BaseTextInput { } private _handleInput(event: Event) { - this._syncHeights(); this.handleInput(event); } private _handleChange(event: Event) { - this._syncHeights(); this.handleChange(event); } From aeaf09fa289eec67cbac6eb31bea3783b601c5b9 Mon Sep 17 00:00:00 2001 From: mimshins Date: Tue, 6 May 2025 21:18:48 +0330 Subject: [PATCH 2/2] add changeset --- .changeset/red-toys-thank.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/red-toys-thank.md diff --git a/.changeset/red-toys-thank.md b/.changeset/red-toys-thank.md new file mode 100644 index 00000000..fdf85061 --- /dev/null +++ b/.changeset/red-toys-thank.md @@ -0,0 +1,6 @@ +--- +"@tapsioss/web-components": patch +--- + +Fix issues with syncing height in auto-resizable mode in text-area + \ No newline at end of file