File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {Platform} from '@angular/cdk/platform';
17
17
selector : `textarea[mat-autosize], textarea[matTextareaAutosize]` ,
18
18
exportAs : 'matTextareaAutosize' ,
19
19
host : {
20
+ 'class' : 'mat-autosize' ,
20
21
// Textarea elements that have the directive applied should have a single row by default.
21
22
// Browsers normally show two rows by default and therefore this limits the minRows binding.
22
23
'rows' : '1' ,
Original file line number Diff line number Diff line change @@ -82,3 +82,9 @@ textarea.mat-input-element {
82
82
resize : vertical ;
83
83
overflow : auto ;
84
84
}
85
+
86
+ // Remove the resize handle on autosizing textareas, because whatever height
87
+ // the user resized to will be overwritten once they start typing again.
88
+ textarea .mat-autosize {
89
+ resize : none ;
90
+ }
You can’t perform that action at this time.
0 commit comments