Skip to content

Commit ff59433

Browse files
committed
chore(): updating demo and version bump
1 parent b05fb77 commit ff59433

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-autosize-app",
3-
"version": "1.8.0-next",
3+
"version": "1.8.0",
44
"homepage": "https://chrum.it/pages/ngx-autosize",
55
"description": "Directive that automatically adjusts textarea height to fit content",
66
"repository": {

projects/autosize/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-autosize",
3-
"version": "1.8.0-next",
3+
"version": "1.8.0",
44
"homepage": "https://chrum.it/pages/ngx-autosize",
55
"description": "Directive that automatically adjusts textarea height to fit content",
66
"repository": {

src/app/app.component.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
<h3>Regular textarea
33
<button (click)="changeNgModel()">Change</button>
44
</h3>
5-
<textarea [(ngModel)]="longText" autosize></textarea>
5+
<textarea [(ngModel)]="longText"
6+
(resized)="onResized($event)"
7+
autosize></textarea>
68
</div>
79

810
<hr/>
911

1012
<div>
1113
<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>
1315
</div>
1416

1517
<hr/>

src/app/app.component.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Text area should come back to its original form :)
2222
export class AppComponent implements OnInit {
2323
public longText = longText;
2424
public resetableContent = resetExplanation;
25-
public minRows = 3;
25+
public minRows = 1;
2626
public maxRows = 4;
2727
public onlyGrow = true;
2828
public useImportant = true;
@@ -57,4 +57,8 @@ export class AppComponent implements OnInit {
5757
resetArbitraryExample() {
5858
this.resetableContent = resetExplanation;
5959
}
60+
61+
onResized(newHeight) {
62+
console.log(newHeight);
63+
}
6064
}

0 commit comments

Comments
 (0)