Browse Source

Merge pull request #11952 from d2eight/master

Add configure appearance to the country autocomplete
pull/12056/head
Andrew Shvayka 2 years ago
committed by GitHub
parent
commit
a4a23b9f38
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/shared/components/country-autocomplete.component.html
  2. 5
      ui-ngx/src/app/shared/components/country-autocomplete.component.ts

2
ui-ngx/src/app/shared/components/country-autocomplete.component.html

@ -15,7 +15,7 @@
limitations under the License.
-->
<mat-form-field [formGroup]="countryFormGroup" class="mat-block" subscriptSizing="{{subscriptSizing}}">
<mat-form-field [formGroup]="countryFormGroup" class="mat-block" subscriptSizing="{{subscriptSizing}}" [appearance]="appearance">
<mat-label>{{ labelText }}</mat-label>
<input matInput type="text"
#countryInput

5
ui-ngx/src/app/shared/components/country-autocomplete.component.ts

@ -28,7 +28,7 @@ import {
import { isNotEmptyStr } from '@core/utils';
import { Observable, of } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, share, switchMap, tap } from 'rxjs/operators';
import { SubscriptSizing } from '@angular/material/form-field';
import { SubscriptSizing, MatFormFieldAppearance } from '@angular/material/form-field';
import { coerceBoolean } from '@shared/decorators/coercion';
import { TranslateService } from '@ngx-translate/core';
@ -71,6 +71,9 @@ export class CountryAutocompleteComponent implements OnInit, ControlValueAccesso
@coerceBoolean()
required = false;
@Input()
appearance: MatFormFieldAppearance = 'fill';
@Input()
subscriptSizing: SubscriptSizing = 'fixed';

Loading…
Cancel
Save