Skip to content

Commit 32fef12

Browse files
committed
refactor: changed minRows and maxRows to mdAutosizeMinRows and mdAutosizeMaxRows
- left minRows and maxRows to not break old versions
1 parent b49bfce commit 32fef12

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/lib/input/autosize.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const textareaStyleReset = `
116116

117117
@Component({
118118
template: `
119-
<textarea mdTextareaAutosize [minRows]="minRows" [maxRows]="maxRows"
119+
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
120120
#autosize="mdTextareaAutosize">
121121
{{content}}
122122
</textarea>`,

src/lib/input/autosize.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,25 @@ export class MdTextareaAutosize implements OnInit {
1717
/** Minimum number of rows for this textarea. */
1818
@Input() minRows: number;
1919

20+
get mdAutosizeMinRows(): number {
21+
return this.minRows;
22+
}
23+
24+
@Input() set mdAutosizeMinRows(value: number) {
25+
this.minRows = value;
26+
}
27+
2028
/** Maximum number of rows for this textarea. */
2129
@Input() maxRows: number;
2230

31+
get mdAutosizeMaxRows(): number {
32+
return this.maxRows;
33+
}
34+
35+
@Input() set mdAutosizeMaxRows(value: number) {
36+
this.maxRows = value;
37+
}
38+
2339
/** Cached height of a textarea with a single row. */
2440
private _cachedLineHeight: number;
2541

0 commit comments

Comments
 (0)