UI: fixed country autocomplete and zip error message
This commit is contained in:
parent
6e76509619
commit
278124746c
@ -20,22 +20,22 @@
|
||||
formControlName="country"
|
||||
(selectCountryCode)="changeCountry($event)">
|
||||
</tb-country-autocomplete>
|
||||
<div fxLayout.gt-sm="row" fxLayoutGap.gt-sm="10px">
|
||||
<mat-form-field class="mat-block">
|
||||
<div class="tb-form-row column-xs tb-standard-fields no-border no-padding">
|
||||
<mat-form-field class="flex">
|
||||
<mat-label translate>contact.city</mat-label>
|
||||
<input matInput formControlName="city">
|
||||
<mat-error *ngIf="parentForm.get('city').hasError('maxlength')">
|
||||
{{ 'contact.city-max-length' | translate }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="mat-block">
|
||||
<mat-form-field class="flex">
|
||||
<mat-label translate>contact.state</mat-label>
|
||||
<input matInput formControlName="state">
|
||||
<mat-error *ngIf="parentForm.get('state').hasError('maxlength')">
|
||||
{{ 'contact.state-max-length' | translate }}
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field class="mat-block">
|
||||
<mat-form-field class="flex">
|
||||
<mat-label translate>contact.postal-code</mat-label>
|
||||
<input matInput formControlName="zip">
|
||||
<mat-error *ngIf="parentForm.get('zip').hasError('pattern')">
|
||||
|
||||
@ -200,7 +200,7 @@ export class CountryAutocompleteComponent implements OnInit, ControlValueAccesso
|
||||
private updateView(value: Country | null) {
|
||||
if (this.modelValue?.name !== value?.name) {
|
||||
this.modelValue = value;
|
||||
this.propagateChange(this.modelValue);
|
||||
this.propagateChange(this.modelValue?.name);
|
||||
if (value) {
|
||||
this.selectCountryCode.emit(value.iso2);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user