diff --git a/ui/src/app/metadata/provider/container/provider-wizard.component.html b/ui/src/app/metadata/provider/container/provider-wizard.component.html index 52d6f5e35..49bad2b07 100644 --- a/ui/src/app/metadata/provider/container/provider-wizard.component.html +++ b/ui/src/app/metadata/provider/container/provider-wizard.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/ui/src/app/metadata/provider/effect/collection.effect.ts b/ui/src/app/metadata/provider/effect/collection.effect.ts index 1eb9e5093..70aff3257 100644 --- a/ui/src/app/metadata/provider/effect/collection.effect.ts +++ b/ui/src/app/metadata/provider/effect/collection.effect.ts @@ -115,6 +115,7 @@ export class CollectionEffects { map(action => action.payload), withLatestFrom(this.store.select(fromI18n.getMessages)), map(([error, messages]) => { + console.log(error); let message = `${error.errorCode}: ${this.i18nService.translate(error.errorMessage, null, messages)}`; message = error.cause ? `${message} - ${error.cause}` : message; return new AddNotification( diff --git a/ui/src/app/notification/component/notification-item.component.ts b/ui/src/app/notification/component/notification-item.component.ts index bc7b93e27..b080724e5 100644 --- a/ui/src/app/notification/component/notification-item.component.ts +++ b/ui/src/app/notification/component/notification-item.component.ts @@ -1,5 +1,6 @@ import { Component, Input, Output, EventEmitter, OnInit } from '@angular/core'; import { Notification } from '../model/notification'; +import { LiveAnnouncer } from '@angular/cdk/a11y'; @Component({ selector: 'notification-item', @@ -10,11 +11,15 @@ export class NotificationItemComponent implements OnInit { @Input() notification: Notification; @Output() clear: EventEmitter = new EventEmitter(); readonly timerCallback = () => this.clear.emit(this.notification); - constructor() {} + constructor( + private announce: LiveAnnouncer + ) {} ngOnInit(): void { if (this.notification.timeout > 0) { setTimeout(this.timerCallback, this.notification.timeout); } + + this.announce.announce(`Error: ${this.notification.body}`); } } /* istanbul ignore next */ 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/shared/autocomplete/autocomplete.component.html b/ui/src/app/shared/autocomplete/autocomplete.component.html index 558dcb454..2611cfc28 100644 --- a/ui/src/app/shared/autocomplete/autocomplete.component.html +++ b/ui/src/app/shared/autocomplete/autocomplete.component.html @@ -54,7 +54,9 @@ [attr.aria-label]="this.input.value" [innerHTML]="option | highlight:this.input.value"> -
diff --git a/ui/src/app/shared/autocomplete/autocomplete.component.ts b/ui/src/app/shared/autocomplete/autocomplete.component.ts index 472db6dd5..80e360114 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); } @@ -229,6 +233,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 { @@ -370,4 +376,4 @@ export class AutoCompleteComponent implements OnInit, OnDestroy, OnChanges, Afte ...this.state.currentState }; } -} /* istanbul ignore next */ +}