mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: changed minRows and maxRows to mdAutosizeMinRows and mdAutosizeMaxRows (#2339)
- left minRows and maxRows to not break old versions
This commit is contained in:
committed by
tinayuangao
parent
d7831d9018
commit
080f570958
@@ -116,7 +116,7 @@ const textareaStyleReset = `
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<textarea mdTextareaAutosize [minRows]="minRows" [maxRows]="maxRows"
|
||||
<textarea mdTextareaAutosize [mdAutosizeMinRows]="minRows" [mdAutosizeMaxRows]="maxRows"
|
||||
#autosize="mdTextareaAutosize">
|
||||
{{content}}
|
||||
</textarea>`,
|
||||
|
||||
@@ -17,9 +17,25 @@ export class MdTextareaAutosize implements OnInit {
|
||||
/** Minimum number of rows for this textarea. */
|
||||
@Input() minRows: number;
|
||||
|
||||
get mdAutosizeMinRows(): number {
|
||||
return this.minRows;
|
||||
}
|
||||
|
||||
@Input() set mdAutosizeMinRows(value: number) {
|
||||
this.minRows = value;
|
||||
}
|
||||
|
||||
/** Maximum number of rows for this textarea. */
|
||||
@Input() maxRows: number;
|
||||
|
||||
get mdAutosizeMaxRows(): number {
|
||||
return this.maxRows;
|
||||
}
|
||||
|
||||
@Input() set mdAutosizeMaxRows(value: number) {
|
||||
this.maxRows = value;
|
||||
}
|
||||
|
||||
/** Cached height of a textarea with a single row. */
|
||||
private _cachedLineHeight: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user