File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ngx-autosize-app" ,
3
- "version" : " 1.8.0-next " ,
3
+ "version" : " 1.8.0" ,
4
4
"homepage" : " https://chrum.it/pages/ngx-autosize" ,
5
5
"description" : " Directive that automatically adjusts textarea height to fit content" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ngx-autosize" ,
3
- "version" : " 1.8.0-next " ,
3
+ "version" : " 1.8.0" ,
4
4
"homepage" : " https://chrum.it/pages/ngx-autosize" ,
5
5
"description" : " Directive that automatically adjusts textarea height to fit content" ,
6
6
"repository" : {
Original file line number Diff line number Diff line change 2
2
< h3 > Regular textarea
3
3
< button (click) ="changeNgModel() "> Change</ button >
4
4
</ h3 >
5
- < textarea [(ngModel)] ="longText " autosize > </ textarea >
5
+ < textarea [(ngModel)] ="longText "
6
+ (resized) ="onResized($event) "
7
+ autosize > </ textarea >
6
8
</ div >
7
9
8
10
< hr />
9
11
10
12
< div >
11
13
< h3 > Min rows < input [(ngModel)] ="minRows "/> </ h3 >
12
- < textarea autosize [minRows] ="minRows "> Less than 3 rows of text but it should keep size </ textarea >
14
+ < textarea autosize rows =" 1 " [minRows] ="minRows "> 1 row of text but it should keep size </ textarea >
13
15
</ div >
14
16
15
17
< hr />
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ Text area should come back to its original form :)
22
22
export class AppComponent implements OnInit {
23
23
public longText = longText ;
24
24
public resetableContent = resetExplanation ;
25
- public minRows = 3 ;
25
+ public minRows = 1 ;
26
26
public maxRows = 4 ;
27
27
public onlyGrow = true ;
28
28
public useImportant = true ;
@@ -57,4 +57,8 @@ export class AppComponent implements OnInit {
57
57
resetArbitraryExample ( ) {
58
58
this . resetableContent = resetExplanation ;
59
59
}
60
+
61
+ onResized ( newHeight ) {
62
+ console . log ( newHeight ) ;
63
+ }
60
64
}
You can’t perform that action at this time.
0 commit comments