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';
1717 selector : `textarea[mat-autosize], textarea[matTextareaAutosize]` ,
1818 exportAs : 'matTextareaAutosize' ,
1919 host : {
20+ 'class' : 'mat-autosize' ,
2021 // Textarea elements that have the directive applied should have a single row by default.
2122 // Browsers normally show two rows by default and therefore this limits the minRows binding.
2223 'rows' : '1' ,
Original file line number Diff line number Diff line change @@ -82,3 +82,9 @@ textarea.mat-input-element {
8282 resize : vertical ;
8383 overflow : auto ;
8484}
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