Skip to content

fix(web-components/text-area): resolve issues with syncing heights in auto-resizable mode #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/red-toys-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tapsioss/web-components": patch
---

Fix issues with syncing height in auto-resizable mode in text-area

8 changes: 3 additions & 5 deletions packages/web-components/src/text-area/text-area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ export class TextArea extends BaseTextInput {
this._resizeSensor?.disconnect();
}

protected override firstUpdated(changed: PropertyValues<this>): void {
super.firstUpdated(changed);
protected override updated(changed: PropertyValues<this>): void {
super.updated(changed);

if (this.value) this._syncHeights();
if (changed.has("value")) this._syncHeights();
}

/** @internal */
Expand Down Expand Up @@ -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);
}

Expand Down