Skip to content

Commit

Permalink
Merge pull request #5000 from vdegenne:textfield-cols
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 576205502
  • Loading branch information
copybara-github committed Oct 24, 2023
2 parents 5e4fafe + 20c9447 commit 04dcf25
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions textfield/internal/text-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ export abstract class TextField extends LitElement {
* Defaults to 2.
*/
@property({type: Number}) rows = 2;
/**
* The number of cols to display for a `type="textarea"` text field.
* Defaults to 20.
*/
@property({type: Number}) cols = 20;

/**
* The associated form element with which this element's value will submit.
Expand Down Expand Up @@ -628,6 +633,7 @@ export abstract class TextField extends LitElement {
?readonly=${this.readOnly}
?required=${this.required}
rows=${this.rows}
cols=${this.cols}
.value=${live(this.value)}
@change=${this.handleChange}
@focusin=${this.handleFocusin}
Expand Down

0 comments on commit 04dcf25

Please sign in to comment.