Skip to content

Commit caff2d7

Browse files
authored
Merge pull request #129 from netgrif/NAE-1739
[NAE-1739] Currency symbol is displayed on new line, when editing currency field
2 parents 6313da1 + 9cf2a9a commit caff2d7

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

projects/netgrif-components/nae-theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,8 @@
3737
margin-top: 16px !important;
3838
margin-bottom: 16px !important;
3939
}
40+
41+
.mat-form-field .mat-form-field-prefix {
42+
position: initial !important;
43+
padding-right: 4px !important;
44+
}

projects/netgrif-components/src/lib/data-fields/data-field.theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
font-weight: 700 !important;
3939
}
4040

41-
.enum-icon-item:hover {
41+
.enum-icon-item-hover:hover {
4242
color: mat.get-color-from-palette($primary) !important;
4343
}
4444

projects/netgrif-components/src/lib/data-fields/enumeration-field/enumeration-icon-field/enumeration-icon-field.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<nc-required-label *ngIf="enumerationField.behavior.required" [isIn]="true"></nc-required-label>
44
<br></mat-label>
55
<div *ngFor="let option of enumerationField.choices; let i = index">
6-
<div class="enum-icon-item enum-icon-item-row" (click)="setEnumValue(option.key)" [ngClass]="{'enum-icon-item-active': isSelected(option.key)}">
6+
<div class="enum-icon-item enum-icon-item-row" (click)="setEnumValue(option.key)" [ngClass]="{'enum-icon-item-active': isSelected(option.key), 'enum-icon-item-hover': !formControlRef.disabled}">
77
<mat-icon *ngIf="resolveIconType(option.key) === 'material'">{{resolveIconValue(option.key)}}</mat-icon>
88
<mat-icon *ngIf="resolveIconType(option.key) === 'svg'" [svgIcon]="resolveIconValue(option.key)"></mat-icon>
99
<span fxFlex class="enum-icon-text">{{option.value}}</span>

projects/netgrif-components/src/lib/data-fields/file-field/file-field.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
.border-LGBTQ {
106106
border: 5px solid transparent;
107107
border-image: linear-gradient(to bottom right, #B827FC 0%, #2C90FC 25%, #B8FD33 50%, #FEC837 75%, #FD1892 100%);
108-
animation: rainbow 10s infinite;
109108
border-image-slice: 1;
109+
animation: rainbow 10s infinite;
110110
}
111111
@keyframes rainbow {
112112
0% { border-image: linear-gradient(to bottom right, #B827FC 0%, #2C90FC 25%, #B8FD33 50%, #FEC837 75%, #FD1892 100%);

projects/netgrif-components/src/lib/data-fields/number-field/number-currency-field/number-currency-field.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<mat-form-field [appearance]="numberField.materialAppearance" class="full-width" color="primary">
22
<mat-label *ngIf="!showLargeLayout.value">{{numberField.title}}</mat-label>
3+
<span matPrefix *ngIf="isNumberType()">{{this.numberField.component.properties['code'] ?? ''}}</span>
34
<input matInput
45
[type]="fieldType"
56
[value]="transformedValue"
@@ -11,4 +12,3 @@
1112
<mat-hint>{{numberField.description}}</mat-hint>
1213
<mat-error *ngIf="numberField.isInvalid(formControlRef)">{{getErrorMessage()}}</mat-error>
1314
</mat-form-field>
14-
<mat-label class="currency-label" *ngIf="isNumberType()">{{getCurrencySymbol()}}</mat-label>
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
.full-width {
2+
display: block;
23
margin: 0 auto;
3-
width: 90%;
4-
}
5-
6-
.currency-label{
7-
margin-left: 5px;
4+
width: 100%;
85
}

0 commit comments

Comments
 (0)