Skip to content

Commit

Permalink
NAS-131323: ddns-updater does not show the IP version value if set to…
Browse files Browse the repository at this point in the history
… “IPv4 and IPv6” when editing the configuration of the docker

(cherry picked from commit b0eaf28)
  • Loading branch information
AlexKarpov98 authored and bugclerk committed Sep 23, 2024
1 parent 503cd4d commit ed52ccc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ mat-option.combobox-mat-options {
}

.mat-mdc-select-arrow {
align-items: center;
display: flex;
opacity: 1;
padding: 13px 2px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,38 +104,33 @@ export class IxComboboxComponent implements ControlValueAccessor, OnInit {
filterOptions(filterValue: string): void {
this.loading = true;
this.cdr.markForCheck();

this.comboboxProviderHandler?.fetch(filterValue).pipe(
catchError(() => {
this.hasErrorInOptions = true;
return EMPTY;
}),
untilDestroyed(this),
).subscribe((options: Option[]) => {
this.loading = false;
this.cdr.markForCheck();

this.options = options;

const selectedOptionFromLabel = this.options.find((option: Option) => option.label === filterValue);
if (selectedOptionFromLabel) {
this.selectedOption = selectedOptionFromLabel;
this.value = selectedOptionFromLabel.value;
this.onChange(this.value);
}
if (!this.selectedOption && this.value !== null && this.value !== '') {
const setOption = this.options.find((option: Option) => option.value === this.value);
if (setOption) {
this.selectedOption = { ...setOption };
if (this.selectedOption) {
this.filterChanged$.next('');
}
} else {
this.selectedOption = { label: this.value as string, value: this.value };
if (this.selectedOption.value) {
this.filterChanged$.next('');
}
} else if (this.value !== null) {
const selectedOptionFromValue = this.options.find((option: Option) => option.value === this.value);
this.selectedOption = selectedOptionFromValue
? { ...selectedOptionFromValue }
: { label: this.value as string, value: this.value };

if (this.selectedOption.value) {
this.filterChanged$.next('');
}
}

this.loading = false;
this.cdr.markForCheck();
});
}
Expand Down

0 comments on commit ed52ccc

Please sign in to comment.