Skip to content

[Textarea]: clearable by default, no default maxRows for autoGrow #751

Description

@ly-tempel-bitweb

Problem

  1. The textarea always opts out of the form field's clear button (clearButton = false in textarea.component.ts), so it never shows one, even when clearable is set. Leaving textareas without a clear button was a deliberate choice, but that decision was recently changed. It's now a requirement that textareas are clearable like the other form field controls.

  2. The autoGrow input maxRows defaults to 12, so an autoGrow textarea stops growing at 12 rows unless the consumer raises the limit.

Solution

1. Clear button

  • A textarea inside a tedi-form-field shows a clear button by default, since clearable is already true by default.
  • Consumers can opt out with <tedi-form-field [clearable]="false">.
  • The button follows the same rules as other controls: it's hidden when the field is empty, disabled or read-only.
  • Clicking it empties the value, updates the bound form control and moves focus back to the textarea.

2. autoGrow maxRows default

  • maxRows has no default value (undefined).
  • When maxRows isn't set, autoGrow has no row limit. maxHeight still caps the height if it's set.
  • When maxRows is set, nothing changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

tedi-readyTEDI-Ready component issue

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions