diff --git a/ui/src/app/schema-form/widget/filter-target/filter-target.component.html b/ui/src/app/schema-form/widget/filter-target/filter-target.component.html index 4ec2b789e..059d0acdd 100644 --- a/ui/src/app/schema-form/widget/filter-target/filter-target.component.html +++ b/ui/src/app/schema-form/widget/filter-target/filter-target.component.html @@ -52,7 +52,7 @@ class="component-control" limit="10" [formControl]="search" - [matches]="ids$ | async" + [matches]="ids" (keydown.enter)="onSelectValue(search.value)"> diff --git a/ui/src/app/schema-form/widget/filter-target/filter-target.component.ts b/ui/src/app/schema-form/widget/filter-target/filter-target.component.ts index 7af0c8b0d..835e2f005 100644 --- a/ui/src/app/schema-form/widget/filter-target/filter-target.component.ts +++ b/ui/src/app/schema-form/widget/filter-target/filter-target.component.ts @@ -40,7 +40,9 @@ export class FilterTargetComponent extends ObjectWidget implements OnDestroy, Af ) { super(); this.ids$ = this.store.select(fromFilters.getEntityCollection); - this.ids$.subscribe(ids => this.ids = ids); + this.ids$.subscribe(ids => { + this.ids = [...ids]; + }); this.search .valueChanges diff --git a/ui/src/app/schema-form/widget/string/string.component.ts b/ui/src/app/schema-form/widget/string/string.component.ts index 506c7b314..d4a3c7ee1 100644 --- a/ui/src/app/schema-form/widget/string/string.component.ts +++ b/ui/src/app/schema-form/widget/string/string.component.ts @@ -34,7 +34,6 @@ export class CustomStringComponent extends StringWidget implements AfterViewInit if (!this.required) { this.errorMessages = this.errorMessages.filter(e => e !== REQUIRED_MSG_OVERRIDE); } - console.log(this.errorMessages.length); }); } diff --git a/ui/src/app/shared/autocomplete/autocomplete.component.html b/ui/src/app/shared/autocomplete/autocomplete.component.html index 735b3bc48..ff4fc99fd 100644 --- a/ui/src/app/shared/autocomplete/autocomplete.component.html +++ b/ui/src/app/shared/autocomplete/autocomplete.component.html @@ -45,7 +45,9 @@ role="option" [attr.aria-selected]="state.currentState.focused === i" [innerHTML]="option | highlight:this.input.value"> - - + \ No newline at end of file diff --git a/ui/src/app/shared/autocomplete/autocomplete.component.ts b/ui/src/app/shared/autocomplete/autocomplete.component.ts index 28a4c0365..a3d7d109a 100644 --- a/ui/src/app/shared/autocomplete/autocomplete.component.ts +++ b/ui/src/app/shared/autocomplete/autocomplete.component.ts @@ -119,11 +119,15 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte ngOnChanges(changes: SimpleChanges): void { if (changes.matches && this.matches) { - const count = this.matches.length; - this.live.announce(count === 0 ? 'No results available' : `${count} result${count === 1 ? '' : 's'} available`); + this.announceResults(); } } + announceResults(): void { + const count = this.matches.length; + this.live.announce(count === 0 ? 'No results available' : `${count} result${count === 1 ? '' : 's'} available`); + } + writeValue(value: any): void { this.input.setValue(value); } @@ -223,6 +227,8 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte selected: searchForOptions ? ((autoselect && optionsAvailable) ? 0 : -1) : null }); this.propagateChange(query); + + setTimeout(() => this.announceResults(), 250); } handleInputFocus(): void { @@ -362,4 +368,4 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte ...this.state.currentState }; } -} /* istanbul ignore next */ +}