Skip to content

Commit 449493b

Browse files
authored
refactor(form): replace matAutosize by cdkAutosize (DEV-968) (#754)
* refactor(form): replace matAutosize by cdkAutosize (DEV-968) * refactor(form): replace matAutosize by cdkAutosize (DEV-968)
1 parent 694cb06 commit 449493b

16 files changed

Lines changed: 121 additions & 114 deletions

File tree

‎src/app/project/ontology/ontology-form/ontology-form.component.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
<mat-form-field class="large-field ontology-comment">
2424
<textarea matInput [formControl]="ontologyForm.controls['comment']"
25-
[placeholder]="'Comment'" [value]="ontologyComment"
26-
matTextareaAutosize matAutosizeMinRows="6" matAutosizeMaxRows="12">
25+
placeholder="Comment" [value]="ontologyComment"
26+
[cdkTextareaAutosize]="true" [cdkAutosizeMinRows]="6" [cdkAutosizeMaxRows]="12">
2727
</textarea>
2828
</mat-form-field>
2929

‎src/app/project/ontology/property-form/property-form.component.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<!-- comment/description -->
6666
<div class="large-field string-literal-container">
6767
<app-string-literal-input
68-
[placeholder]="'Comment'"
68+
placeholder="Comment"
6969
[value]="comments"
7070
[disabled]="(resClassIri && propertyInfo.propDef)"
7171
[textarea]="true"

‎src/app/project/ontology/resource-class-form/resource-class-form.component.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<!-- description -->
3535
<div class="large-field string-literal-container more-space-top">
3636
<app-string-literal-input
37-
[placeholder]="'Comment'"
37+
placeholder="Comment"
3838
[value]="resourceClassComments"
3939
[textarea]="true"
4040
(touched)="resourceClassCommentsTouched = $event"

‎src/app/project/project-form/project-form.component.html‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@
4141
{{ formErrors.description }}
4242
</mat-hint>
4343

44-
<!-- <mat-form-field class="large-field">
45-
<textarea matInput matTextareaAutosize matAutosizeMinRows="6" matAutosizeMaxRows="12"
46-
[placeholder]=" 'appLabels.form.project.general.description' | translate "
47-
[formControl]="form.controls['description']">
48-
</textarea>
49-
<mat-hint *ngIf="formErrors.description">
50-
{{ formErrors.description }}
51-
</mat-hint>
52-
</mat-form-field> -->
53-
5444
<!-- institution -->
5545
<!--
5646
<mat-form-field class="large">

‎src/app/workspace/resource/resource-link-form/resource-link-form.component.html‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@
1919
</mat-form-field>
2020

2121
<mat-form-field class="large-field ontology-comment">
22-
<textarea matInput [formControl]="form.controls['comment']"
23-
[placeholder]="'Comment'"
24-
matTextareaAutosize matAutosizeMinRows="6" matAutosizeMaxRows="12">
22+
<textarea matInput
23+
placeholder="Comment"
24+
[formControl]="form.controls['comment']"
25+
[cdkTextareaAutosize]="true"
26+
[cdkAutosizeMinRows]="6"
27+
[cdkAutosizeMaxRows]="12">
2528
</textarea>
2629
</mat-form-field>
2730

‎src/app/workspace/resource/values/boolean-value/boolean-value.component.html‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@
1414
</mat-error>
1515
<mat-form-field class="large-field value-component-comment">
1616
<textarea
17-
matInput
18-
cdkTextareaAutosize
19-
cdkAutosizeMinRows="1"
20-
cdkAutosizeMaxRows="6"
21-
[formControlName]="'comment'"
22-
class="comment"
23-
placeholder="Comment"
24-
type="text"
25-
spellcheck="false">
17+
matInput
18+
class="comment"
19+
placeholder="Comment"
20+
spellcheck="false"
21+
[cdkTextareaAutosize]="true"
22+
[cdkAutosizeMinRows]="1"
23+
[cdkAutosizeMaxRows]="6"
24+
[formControlName]="'comment'">
2625
</textarea>
2726
</mat-form-field>
2827
</span>

‎src/app/workspace/resource/values/color-value/color-value.component.html‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@
2929
<mat-form-field class="large-field value-component-comment">
3030
<textarea
3131
matInput
32-
cdkTextareaAutosize
33-
cdkAutosizeMinRows="1"
34-
cdkAutosizeMaxRows="6"
35-
[formControlName]="'comment'"
3632
class="comment"
3733
placeholder="Comment"
38-
type="text"
39-
spellcheck="false">
34+
spellcheck="false"
35+
[cdkTextareaAutosize]="true"
36+
[cdkAutosizeMinRows]="1"
37+
[cdkAutosizeMaxRows]="6"
38+
[formControlName]="'comment'">
4039
</textarea>
4140
</mat-form-field>
4241
</span>

‎src/app/workspace/resource/values/date-value/date-value.component.html‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727

2828
<!-- Comment field -->
2929
<mat-form-field class="large-field value-component-comment">
30-
<textarea matInput
31-
cdkTextareaAutosize
32-
cdkAutosizeMinRows="1"
33-
cdkAutosizeMaxRows="6"
34-
[formControlName]="'comment'"
35-
class="comment"
36-
placeholder="Comment"
37-
type="text"
38-
spellcheck="false">
39-
</textarea>
30+
<textarea
31+
matInput
32+
class="comment"
33+
placeholder="Comment"
34+
spellcheck="false"
35+
[cdkTextareaAutosize]="true"
36+
[cdkAutosizeMinRows]="1"
37+
[cdkAutosizeMaxRows]="6"
38+
[formControlName]="'comment'">
39+
</textarea>
4040
</mat-form-field>
4141
</span>
4242
</ng-template>

‎src/app/workspace/resource/values/decimal-value/decimal-value.component.html‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
</mat-error>
2222
</mat-form-field>
2323
<mat-form-field class="large-field value-component-comment">
24-
<textarea matInput
25-
cdkTextareaAutosize
26-
cdkAutosizeMinRows="1"
27-
cdkAutosizeMaxRows="6"
28-
[formControlName]="'comment'"
29-
class="comment"
30-
placeholder="Comment"
31-
type="text"
32-
spellcheck="false">
24+
<textarea
25+
matInput
26+
class="comment"
27+
placeholder="Comment"
28+
spellcheck="false"
29+
[cdkTextareaAutosize]="true"
30+
[cdkAutosizeMinRows]="1"
31+
[cdkAutosizeMaxRows]="6"
32+
[formControlName]="'comment'">
3333
</textarea>
3434
</mat-form-field>
3535
</span>

‎src/app/workspace/resource/values/geoname-value/geoname-value.component.html‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
</mat-error>
2929
</mat-form-field>
3030
<mat-form-field class="large-field value-component-comment">
31-
<textarea matInput
32-
cdkTextareaAutosize
33-
cdkAutosizeMinRows="1"
34-
cdkAutosizeMaxRows="6"
35-
[formControlName]="'comment'"
36-
class="comment"
37-
placeholder="Comment"
38-
type="text"
39-
spellcheck="false">
31+
<textarea
32+
matInput
33+
class="comment"
34+
placeholder="Comment"
35+
spellcheck="false"
36+
[cdkTextareaAutosize]="true"
37+
[cdkAutosizeMinRows]="1"
38+
[cdkAutosizeMaxRows]="6"
39+
[formControlName]="'comment'">
4040
</textarea>
4141
</mat-form-field>
4242
</span>

0 commit comments

Comments
 (0)