Browse Source

UI: Fixed country autocomplete required

pull/14822/head
Vladyslav_Prykhodko 9 months ago
committed by Vladyslav Prykhodko
parent
commit
9eb37d79af
  1. 2
      ui-ngx/src/app/shared/components/country-autocomplete.component.ts

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

@ -130,7 +130,7 @@ export class CountryAutocompleteComponent implements OnInit, OnChanges, ControlV
if (changes.required) {
const requiredChanges = changes.required;
if (requiredChanges.currentValue !== requiredChanges.previousValue) {
if (requiredChanges.currentValue) {
if (this.required) {
this.countryFormGroup.get('country').addValidators(Validators.required);
} else {
this.countryFormGroup.get('country').removeValidators(Validators.required);

Loading…
Cancel
Save